ASN1C C/C++ Common Runtime  ASN1C v7.7.x
Classes | Macros | Typedefs | Functions
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
 

Macros

#define DLISTBUF_SEG   16
 
#define OSRTDLISTNODESIZE   ((sizeof(OSRTDListNode)+7)&(~7))
 
#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)
 
OSRTDListNodertxDListAppend (struct OSCTXT *pctxt, OSRTDList *pList, void *pData)
 
OSRTDListNodertxDListAppendCharArray (struct OSCTXT *pctxt, OSRTDList *pList, size_t length, char *pData)
 
OSRTDListNodertxDListAppendNode (OSRTDList *pList, OSRTDListNode *pListNode)
 
OSRTDListNodertxDListInsert (struct OSCTXT *pctxt, OSRTDList *pList, OSSIZE idx, void *pData)
 
OSRTDListNodertxDListInsertNode (OSRTDList *pList, OSSIZE idx, OSRTDListNode *pListNode)
 
OSRTDListNodertxDListInsertBefore (struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node, void *pData)
 
OSRTDListNodertxDListInsertAfter (struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node, void *pData)
 
OSRTDListNodertxDListFindByIndex (const OSRTDList *pList, OSSIZE idx)
 
OSRTDListNodertxDListFindByData (const OSRTDList *pList, void *data)
 
OSRTDListNodertxDListFindFirstData (const OSRTDList *pList)
 
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 rtxDListToPointerArray (struct OSCTXT *pctxt, OSRTDList *pList, void ***ppArray, OSSIZE *pElemCount)
 
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)
 
OSRTDListNodertxDListInsertSorted (struct OSCTXT *pctxt, OSRTDList *pList, void *pData, PEqualsFunc equalsFunc, void *sortCtxt)
 
OSRTDListNodertxDListInsertNodeSorted (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.

Macro Definition Documentation

◆ rtxDListAllocNodeAndData

#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 rtxMemAlloc(pctxt, nbytes)
Definition: rtxMemory.h:327
Definition: rtxDList.h:52

◆ rtxDListAppendData

#define rtxDListAppendData (   pctxt,
  pList,
  pData 
)
Value:
do { \
rtxDListAppend(pctxt,pList,pData); \
} while(0);

◆ rtxDListFastInit

#define rtxDListFastInit (   pList)
Value:
do { \
if ((pList) != 0) { \
(pList)->head = (pList)->tail = (OSRTDListNode*) 0; \
(pList)->count = 0; } \
} while (0)
Definition: rtxDList.h:52