8 #ifndef CNOBJECTARRAY_H
9 #define CNOBJECTARRAY_H
46 static inline struct CNResource *
57 static inline uint64_t
91 assert(orgobj == NULL) ;
static struct CNResource * CNResourceOfObjectArray(struct CNObjectArray *src)
Get resource of object array.
Definition: CNObjectArray.h:47
struct CNObjectList CNElementListOfObjectArray(const struct CNObjectArray *src, struct CNResource *resource)
Make object list of array.
Array of pointers.
Definition: CNArray.h:18
void * CNPointerInArray(const struct CNArray *src, uint64_t index)
Get element in the array.
Array of instances.
Definition: CNObjectArray.h:17
Define CNArray data structure.
void * CNSetPointerToArray(struct CNArray *dst, uint64_t index, void *src)
Set pointer to the array at the given index.
static uint64_t CNCountOfArray(const struct CNArray *src)
Get the count of elements in the array.
Definition: CNArray.h:64
List of CNObject.
Definition: CNObjectList.h:17
Root object.
Definition: CNObject.h:38
CNBoolean CNVisitElementOfArray(const struct CNArray *src, CNVisitElementOfArrayFuncRef visitfunc, void *info)
Visit all elements in the array.
static struct CNResource * CNResourceOfArray(const struct CNArray *src)
Get resource of array.
Definition: CNArray.h:53
static CNBoolean CNVisitElementOfObjectArray(const struct CNObjectArray *src, CNVisitElementOfArrayFuncRef visitfunc, void *info)
Visit all elements in the array.
Definition: CNObjectArray.h:125
void CNInitArray(struct CNArray *dst, struct CNResource *resource)
Initialize array.
CNBoolean(* CNVisitElementOfArrayFuncRef)(uint64_t index, void *src, void *info)
Definition: CNArray.h:30
static void CNSetObjectToArray(struct CNObjectArray *dst, uint64_t index, struct CNObject *src)
Set objectto the array at the given index.
Definition: CNObjectArray.h:72
static void CNInitObjectArray(struct CNObjectArray *dst, struct CNResource *resource)
Initialize instance array.
Definition: CNObjectArray.h:29
Define CNObject data structure.
struct CNResource * resource
Definition: CNArray.h:20
void CNDestroyObjectArray(struct CNObjectArray *dst)
Destroy instance array.
static void CNAddObjectToArray(struct CNObjectArray *dst, struct CNObject *src)
Add object as the last element of the array.
Definition: CNObjectArray.h:87
static uint64_t CNCountOfObjectArray(const struct CNObjectArray *src)
Get the count of elements in the array.
Definition: CNObjectArray.h:58
void CNReleaseObject(struct CNObject *dst)
Release the object.
static void CNRetainObject(struct CNObject *dst)
Retain the object.
Definition: CNObject.h:75
static struct CNObject * CNObjectInArray(const struct CNObjectArray *src, uint64_t index)
Get object in the array.
Definition: CNObjectArray.h:102
struct CNArray coreArray
Definition: CNObjectArray.h:20
unsigned int CNBoolean
Boolean type.
Definition: CNType.h:14