rtxDList.h File Reference
#include "rtxsrc/osSysTypes.h"
#include "rtxsrc/rtxExternDefs.h"
#include "rtxsrc/rtxCommonDefs.h"
Go to the source code of this file.
Classes | |
struct | OSRTDListNode |
struct | OSRTDList |
struct | OSRTDListBuf |
struct | OSRTDListUTF8StrNode |
Defines | |
#define | OSRTDLISTNODESIZE ((sizeof(OSRTDListNode)+7)&(0xFFFFFFF8)) |
#define | rtxDListAllocNodeAndData(pctxt, type, ppnode, ppdata) |
#define | rtxDListAppendData(pctxt, pList, pData) |
#define | rtxDListFastInit(pList) |
#define | rtxDListFreeTailNode(pctxt, pList) rtxDListFreeNode(pctxt,pList,(pList)->tail) |
#define | rtxDListFreeHeadNode(pctxt, pList) rtxDListFreeNode(pctxt,pList,(pList)->head) |
Typedefs | |
typedef struct OSRTDListNode | OSRTDListNode |
typedef struct OSRTDList | OSRTDList |
typedef struct OSRTDListBuf | OSRTDListBuf |
typedef struct OSRTDListUTF8StrNode | OSRTDListUTF8StrNode |
typedef int(* | PEqualsFunc )(const void *a, const void *b, const void *sortCtxt) |
Functions | |
void | rtxDListInit (OSRTDList *pList) |
OSRTDListNode * | rtxDListAppend (struct OSCTXT *pctxt, OSRTDList *pList, void *pData) |
OSRTDListNode * | rtxDListAppendCharArray (struct OSCTXT *pctxt, OSRTDList *pList, size_t length, char *pData) |
OSRTDListNode * | rtxDListAppendNode (OSRTDList *pList, OSRTDListNode *pListNode) |
OSRTDListNode * | rtxDListInsert (struct OSCTXT *pctxt, OSRTDList *pList, OSSIZE idx, void *pData) |
OSRTDListNode * | rtxDListInsertNode (OSRTDList *pList, OSSIZE idx, OSRTDListNode *pListNode) |
OSRTDListNode * | rtxDListInsertBefore (struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node, void *pData) |
OSRTDListNode * | rtxDListInsertAfter (struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node, void *pData) |
OSRTDListNode * | rtxDListFindByIndex (const OSRTDList *pList, OSSIZE idx) |
OSRTDListNode * | rtxDListFindByData (const OSRTDList *pList, void *data) |
int | rtxDListFindIndexByData (const OSRTDList *pList, void *data) |
void | rtxDListFreeNode (struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node) |
void | rtxDListRemove (OSRTDList *pList, OSRTDListNode *node) |
void | rtxDListFreeNodes (struct OSCTXT *pctxt, OSRTDList *pList) |
void | rtxDListFreeAll (struct OSCTXT *pctxt, OSRTDList *pList) |
int | rtxDListToArray (struct OSCTXT *pctxt, OSRTDList *pList, void **ppArray, OSSIZE *pElemCount, OSSIZE elemSize) |
int | rtxDListAppendArray (struct OSCTXT *pctxt, OSRTDList *pList, void *pArray, OSSIZE numElements, OSSIZE elemSize) |
int | rtxDListAppendArrayCopy (struct OSCTXT *pctxt, OSRTDList *pList, const void *pArray, OSSIZE numElements, OSSIZE elemSize) |
int | rtxDListToUTF8Str (struct OSCTXT *pctxt, OSRTDList *pList, OSUTF8CHAR **ppstr, char sep) |
OSRTDListNode * | rtxDListInsertSorted (struct OSCTXT *pctxt, OSRTDList *pList, void *pData, PEqualsFunc equalsFunc, void *sortCtxt) |
OSRTDListNode * | rtxDListInsertNodeSorted (OSRTDList *pList, OSRTDListNode *pListNode, PEqualsFunc equalsFunc, void *sortCtxt) |
void | rtxDListBufInit (OSRTDListBuf *pBuf, OSSIZE segSz, void **ppdata, OSSIZE elemSz) |
int | rtxDListBufExpand (struct OSCTXT *pctxt, OSRTDListBuf *pBuf) |
int | rtxDListBufToArray (struct OSCTXT *pctxt, OSRTDListBuf *pBuf) |
Detailed Description
Doubly-Linked List Utility Functions.
Define Documentation
#define rtxDListAllocNodeAndData | ( | pctxt, | |||
type, | |||||
ppnode, | |||||
ppdata | ) |
Value:
do { \ *ppnode = (OSRTDListNode*) \ rtxMemAlloc (pctxt, sizeof(type)+OSRTDLISTNODESIZE); \ if (0 != *ppnode) { \ (*ppnode)->data = (void*)((char*)(*ppnode)+OSRTDLISTNODESIZE); \ *ppdata = (type*)((*ppnode)->data); \ } else { *ppdata = 0; } \ } while (0)
#define rtxDListAppendData | ( | pctxt, | |||
pList, | |||||
pData | ) |
Value:
do { \ OSRTDListNode* _node = (OSRTDListNode*) \ (((char*)(pData)) - sizeof(OSRTDListNode)); \ _node->data = pData; \ rtxDListAppendNode (pList, _node); \ } while (0);
#define rtxDListFastInit | ( | pList | ) |
Value:
do { \ if ((pList) != 0) { \ (pList)->head = (pList)->tail = (OSRTDListNode*) 0; \ (pList)->count = 0; } \ } while (0)