87 #ifndef REGIFY_UTIL_LIST_H
88 #define REGIFY_UTIL_LIST_H
190 #define ruListAppend(rl, data) ruListAppendPtr(rl, (perm_ptr)(data))
201 #define ruListPush(rl, data) ruListAppendPtr(rl, (perm_ptr)(data))
344 #define ruListIter(rl) ruListHead(rl, NULL)
399 #define ruIterNext(re, type) (type) ruListNextData(&(re), NULL)
427 #define ruListIdx(rl, index, type, code) (type)ruListIdxData(rl, index, code)
457 #define ruListRemoveTo(rl, rle, dest) ruListRemoveDataTo(rl, &(rle), (ptr*)&(dest))
485 #define ruListRemoveIdxTo(rl, index, dest) ruListRemoveIdxDataTo(rl, index, (ptr*)&(dest))
515 #define ruListPopTo(rl, dest) ruListPopDataTo(rl, (ptr*)&(dest))
549 #define ruListTryPopTo(rl, timeoutMs, dest) ruListTryPopDataTo(rl, timeoutMs, (ptr*)&(dest))
577 #define ruIterTo(re, dest) ruListNextDataTo(&(re), (ptr*)&(dest))
607 #define ruListIdxTo(rl, index, dest) ruListIdxDataTo(rl, index, (ptr*)&(dest))
RUAPI int32_t ruListInsertIdx(ruList rl, int32_t index, perm_ptr data)
Inserts given object at indexed position in list in given list element.
RUAPI alloc_chars ruListJoin(ruList rl, trans_chars delim, int32_t *code)
Joins a list of char* item with given delim.
RUAPI bool ruListElmtIsHead(ruListElmt re, int32_t *code)
Indicates whether given element is the first in the given list.
RUAPI bool ruListElmtIsTail(ruListElmt re, int32_t *code)
Indicates whether given element is the last in the given list.
RUAPI int32_t ruListSort(ruList rl)
Sorts the given list using the associated types comparator function.
RUAPI int32_t ruListInsertBefore(ruList rl, ruListElmt rle, perm_ptr data)
Inserts given object before given list element.
RUAPI ruListElmt ruListHead(ruList rl, int32_t *code)
Returns the first element in the given list.
RUAPI ruListElmt ruListNextElmt(ruListElmt re, int32_t *code)
Return the next element following the given element from list.
RUAPI int32_t ruListBind(ruList rl, bool bound)
Allows ignoring or obeying the ruListNewBound maxSize of a ruList.
void * ruIterator
Opaque pointer to list iterator object. See List Collection.
Definition: list.h:115
void * ruListElmt
Opaque pointer to list element object. See List Collection.
Definition: list.h:109
RUAPI ruList ruListFree(ruList rl)
Frees the given list object.
RUAPI ruList ruListNew(ruType valueType)
Creates a new list object. To be freed with ruListFree.
RUAPI ruListElmt ruListTail(ruList rl, int32_t *code)
Returns the last element in the given list.
void * ruList
Opaque pointer to list object. See List Collection.
Definition: list.h:103
RUAPI int32_t ruListClear(ruList rl)
Clears the given list.
RUAPI ruList ruListNewBound(ruType valueType, uint32_t maxSize, bool ordered)
Creates a new bound list object. To be freed with ruListFree.
RUAPI int32_t ruListInsertAfter(ruList rl, ruListElmt rle, perm_ptr data)
Inserts given object after given list element.
RUAPI uint32_t ruListSize(ruList rl, int32_t *code)
Returns the number of elements in the list.
RUAPI int32_t ruListAppendPtr(ruList rl, perm_ptr data)
Appends the given object to the list.
RUAPI ptr ruListRemove(ruList rl, ruListElmt *rle, int32_t *code)
Remove and return the current list element from list.
RUAPI ptr ruListTryPop(ruList rl, msec_t timeoutMs, int32_t *code)
Tries to return first element of the list.
RUAPI ptr ruListIdxData(ruList rl, int32_t index, int32_t *code)
Returns the data payload of the element at given 0 based index.
RUAPI ptr ruListNextData(ruListElmt *re, int32_t *code)
Returns the data payload of the next list element.
RUAPI ptr ruListPop(ruList rl, int32_t *code)
Return first element of the list.
RUAPI ptr ruListRemoveIdx(ruList rl, int32_t index, int32_t *code)
Remove and return the list element at index position from list.
RUAPI int32_t ruListRemoveDataTo(ruList rl, ruListElmt *rle, ptr *dest)
Remove and return the current list element from list.
RUAPI int32_t ruListPopDataTo(ruList rl, ptr *dest)
Return first element of the list.
RUAPI int32_t ruListIdxDataTo(ruList rl, int32_t index, ptr *dest)
Returns the data payload of the element at given 0 based index.
RUAPI int32_t ruListRemoveIdxDataTo(ruList rl, int32_t index, ptr *dest)
Remove and return the list element at index position from list.
RUAPI int32_t ruListNextDataTo(ruListElmt *re, ptr *dest)
Returns the data payload of the next list element.
RUAPI int32_t ruListTryPopDataTo(ruList rl, msec_t timeoutMs, ptr *dest)
Tries to return first element of the list.
const void * perm_ptr
A permanent pointer.
Definition: regify-util.h:277
const char * trans_chars
A transient NULL terminated string pointer.
Definition: regify-util.h:186
char * alloc_chars
An allocated NULL terminated string pointer.
Definition: regify-util.h:199
void * ptr
A generic pointer.
Definition: regify-util.h:304
int64_t msec_t
A signed type for expressing milli seconds.
Definition: regify-util.h:318
void * ruType
An opaque type representing a type specification.
Definition: regify-util.h:344