Coconut Framework
beta
|
Define CNFixedObjectArray data structure. More...
Go to the source code of this file.
Classes | |
struct | CNFixedObjectArray |
Array of instances. More... | |
Functions | |
static void | CNInitFixedObjectArray (struct CNFixedObjectArray *dst, uint64_t maxnum, struct CNResource *resource) |
Initialize instance array. More... | |
void | CNDestroyFixedObjectArray (struct CNFixedObjectArray *dst) |
Destroy instance array. More... | |
static uint64_t | CNCountOfFixedObjectArray (const struct CNFixedObjectArray *src) |
Get the count of elements in the array. More... | |
static void | CNSetObjectToFixedObjectArray (struct CNFixedObjectArray *dst, unsigned int index, struct CNObject *src) |
Set objectto the array at the given index. More... | |
static struct CNObject * | CNObjectInFixedObjectArray (const struct CNFixedObjectArray *src, unsigned int index) |
Get object in the array. More... | |
struct CNObjectList | CNElementListOfFixedObjectArray (const struct CNFixedObjectArray *src, struct CNResource *resource) |
Make object list of array. More... | |
static CNBoolean | CNVisitElementOfFixedObjectArray (const struct CNFixedObjectArray *src, CNVisitElementOfFixedArrayFuncRef visitfunc, void *info) |
Visit all elements in the array. More... | |
Define CNFixedObjectArray data structure.
|
inlinestatic |
Initialize instance array.
dst | Destination array |
maxnum | Max number of elements |
resource | Resource to allocate the array |
References CNInitFixedArray(), and CNFixedObjectArray::coreArray.
void CNDestroyFixedObjectArray | ( | struct CNFixedObjectArray * | dst | ) |
Destroy instance array.
dst | Destination array |
|
inlinestatic |
Get the count of elements in the array.
src | Source array |
References CNCountOfFixedArray(), and CNFixedObjectArray::coreArray.
|
inlinestatic |
Set objectto the array at the given index.
dst | Destination array |
index | Index of the array to set |
src | Souce object to be set |
References CNReleaseObject(), CNRetainObject(), CNSetPointerToFixedArray(), and CNFixedObjectArray::coreArray.
|
static |
Get object in the array.
insance | Instance in the array |
null | No instance at the given index |
src | Source instance array |
index | Index to choose element |
References CNPointerInFixedArray(), and CNFixedObjectArray::coreArray.
struct CNObjectList CNElementListOfFixedObjectArray | ( | const struct CNFixedObjectArray * | src, |
struct CNResource * | resource | ||
) |
Make object list of array.
src | Source object array |
resource | Resource to allocate the list |
|
inlinestatic |
Visit all elements in the array.
TRUE | All elements are visited |
FALSE | All elements are NOT visited |
src | Source array |
visitfunc | Function which is called foreach elements |
info | Additiona parameter for visit function |
References CNVisitElementOfFixedArray(), and CNFixedObjectArray::coreArray.