|
Coconut Framework
beta
|
Define CNFixedArray data structure. More...
Go to the source code of this file.
Classes | |
| struct | CNFixedArray |
| Array of fixed number of pointers. More... | |
Typedefs | |
| typedef CNBoolean(* | CNVisitElementOfFixedArrayFuncRef )(uint64_t index, void *src, void *info) |
Functions | |
| void | CNInitFixedArray (struct CNFixedArray *dst, uint64_t maxnum, struct CNResource *resource) |
| Initialize pointer array. More... | |
| void | CNDestroyFixedArray (struct CNFixedArray *dst) |
| Release all resource the fixed array. More... | |
| static struct CNResource * | CNResourceOfFixedArray (const struct CNFixedArray *src) |
| Get resource of fixed array. More... | |
| static uint64_t | CNCountOfFixedArray (const struct CNFixedArray *src) |
| Get the count of elements in the fixed array. More... | |
| void * | CNSetPointerToFixedArray (struct CNFixedArray *dst, uint64_t index, void *src) |
| Set pointer to the array at the given index. More... | |
| void * | CNPointerInFixedArray (const struct CNFixedArray *src, uint64_t index) |
| Get element in the fixed array. More... | |
| struct CNList | CNElementListOfFixedArray (const struct CNFixedArray *src, struct CNResource *resource) |
| Make element list of array. More... | |
| CNBoolean | CNVisitElementOfFixedArray (const struct CNFixedArray *src, CNVisitElementOfFixedArrayFuncRef visitfunc, void *info) |
| Visit all elements in the fixed array. More... | |
Define CNFixedArray data structure.
| typedef CNBoolean(* CNVisitElementOfFixedArrayFuncRef)(uint64_t index, void *src, void *info) |
The function to visit the element in CNArray
| void CNInitFixedArray | ( | struct CNFixedArray * | dst, |
| uint64_t | maxnum, | ||
| struct CNResource * | resource | ||
| ) |
Initialize pointer array.
| dst | Destination fixed array |
| maxnum | Max number of elements |
| resource | Resource to allocate array |
Referenced by CNInitFixedObjectArray().
| void CNDestroyFixedArray | ( | struct CNFixedArray * | dst | ) |
Release all resource the fixed array.
| dst | Destination fixed array |
|
static |
Get resource of fixed array.
| src | Source array |
References CNFixedArray::resource.
|
inlinestatic |
Get the count of elements in the fixed array.
| src | Source fixed array |
References CNFixedArray::maxNum.
Referenced by CNCountOfFixedObjectArray().
| void* CNSetPointerToFixedArray | ( | struct CNFixedArray * | dst, |
| uint64_t | index, | ||
| void * | src | ||
| ) |
Set pointer to the array at the given index.
| dst | Destination fixed array |
| index | Index to set the source |
| src | Source pointer |
Referenced by CNSetObjectToFixedObjectArray().
| void* CNPointerInFixedArray | ( | const struct CNFixedArray * | src, |
| uint64_t | index | ||
| ) |
Get element in the fixed array.
| ptr | Element of the fixed array. |
| NULL | The element has NULL pointer or the index is out of range |
| src | Source pointer array |
| index | Index for array access |
Referenced by CNObjectInFixedObjectArray().
| struct CNList CNElementListOfFixedArray | ( | const struct CNFixedArray * | src, |
| struct CNResource * | resource | ||
| ) |
Make element list of array.
| src | Source object array |
| resource | Resource to allocate the list |
| CNBoolean CNVisitElementOfFixedArray | ( | const struct CNFixedArray * | src, |
| CNVisitElementOfFixedArrayFuncRef | visitfunc, | ||
| void * | info | ||
| ) |
Visit all elements in the fixed 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 |
Referenced by CNVisitElementOfFixedObjectArray().
1.8.5