Coconut Framework
beta
|
Define CNObjectArray data structure. More...
Go to the source code of this file.
Classes | |
struct | CNObjectArray |
Array of instances. More... | |
Functions | |
static void | CNInitObjectArray (struct CNObjectArray *dst, struct CNResource *resource) |
Initialize instance array. More... | |
void | CNDestroyObjectArray (struct CNObjectArray *dst) |
Destroy instance array. More... | |
static struct CNResource * | CNResourceOfObjectArray (struct CNObjectArray *src) |
Get resource of object array. More... | |
static uint64_t | CNCountOfObjectArray (const struct CNObjectArray *src) |
Get the count of elements in the array. More... | |
static void | CNSetObjectToArray (struct CNObjectArray *dst, uint64_t index, struct CNObject *src) |
Set objectto the array at the given index. More... | |
static void | CNAddObjectToArray (struct CNObjectArray *dst, struct CNObject *src) |
Add object as the last element of the array. More... | |
static struct CNObject * | CNObjectInArray (const struct CNObjectArray *src, uint64_t index) |
Get object in the array. More... | |
struct CNObjectList | CNElementListOfObjectArray (const struct CNObjectArray *src, struct CNResource *resource) |
Make object list of array. More... | |
static CNBoolean | CNVisitElementOfObjectArray (const struct CNObjectArray *src, CNVisitElementOfArrayFuncRef visitfunc, void *info) |
Visit all elements in the array. More... | |
Define CNObjectArray data structure.
|
inlinestatic |
Initialize instance array.
dst | Destination array |
resource | Resource to allocate the array |
References CNInitArray(), and CNObjectArray::coreArray.
void CNDestroyObjectArray | ( | struct CNObjectArray * | dst | ) |
Destroy instance array.
dst | Destination array |
|
static |
Get resource of object array.
src | Source object array |
References CNResourceOfArray(), and CNObjectArray::coreArray.
|
inlinestatic |
Get the count of elements in the array.
src | Source array |
References CNCountOfArray(), and CNObjectArray::coreArray.
Referenced by CNAddObjectToArray().
|
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(), CNSetPointerToArray(), and CNObjectArray::coreArray.
|
inlinestatic |
Add object as the last element of the array.
dst | Destination array |
src | Source pointer |
References CNCountOfObjectArray(), CNRetainObject(), CNSetPointerToArray(), and CNObjectArray::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 CNPointerInArray(), and CNObjectArray::coreArray.
struct CNObjectList CNElementListOfObjectArray | ( | const struct CNObjectArray * | 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 CNVisitElementOfArray(), and CNObjectArray::coreArray.