31 static inline struct CNList
Single linked list item.
Definition: CNListItem.h:16
struct CNListItem * CNSearchDataInList(const struct CNList *list, void *data)
Search list item which has source data reference.
void * CNUnlinkLastItemFromList(struct CNList *dst)
Get and unlink last item in the list.
static struct CNList CNMakeEmptyList(struct CNResource *resource)
Initialize CNList.
Definition: CNList.h:32
List of pointers.
Definition: CNList.h:17
static struct CNListItem * CNCentinelListItem(const struct CNList *src)
Get centinel item of the list.
Definition: CNList.h:88
void * CNUnlinkItemFromList(struct CNList *owner, struct CNListItem *dst)
Unlink an item from the list and return it's data.
struct CNListItem * _nextItem
Definition: CNListItem.h:18
void * CNUnlinkFirstItemFromList(struct CNList *dst)
Get and unlink 1st item in the list.
void CNAppendItemToList(struct CNList *dst, void *src)
Append object to the list.
static struct CNListItem * CNLastListItem(const struct CNList *src)
Get last item in the list.
Definition: CNList.h:77
void CNMoveList(struct CNList *dst, struct CNList *src)
Move items from source to destination.
void CNInsertItemToList(struct CNList *owner, struct CNListItem *prev, void *src)
Insert item to the list.
struct CNListItem * CNSearchMatchedDataInList(const struct CNList *list, CNMatchDataFuncRef func, void *info)
Search list item which matched source data.
void CNPrependItemToList(struct CNList *dst, void *src)
Prepend object to the list.
struct CNResource * resource
Definition: CNList.h:19
void CNDestroyList(struct CNList *dst)
Destroy CNObject(s) in the list and list items.
struct CNList CNCopyList(const struct CNList *src)
Make the copy of source list.
CNBoolean(* CNMatchDataFuncRef)(const void *src, void *info)
Function to maching objects.
Definition: CNType.h:25
Define primitive data types.
struct CNListItem * centinelItem
Root list item.
Definition: CNList.h:23
void CNInsertItemsToList(struct CNList *owner, struct CNListItem *prev, const struct CNList *src)
Insert items to the list.
struct CNListItem * _prevItem
Definition: CNListItem.h:20
static size_t CNCountOfItemsInList(const struct CNList *src)
Get count of items in the list.
Definition: CNList.h:55
Define CNListItem data structure.
static struct CNListItem * CNFirstListItem(const struct CNList *src)
Get 1st item in the list.
Definition: CNList.h:66
static struct CNListItem * CNAllocateListItem(void *data, struct CNResource *resource)
Allocate CNListItem.
Definition: CNListItem.h:34
void CNAppendItemsToList(struct CNList *dst, struct CNList *src)
Copy items from source to destination.
size_t itemCount
Definition: CNList.h:21