Ion C
C library for Ion
Loading...
Searching...
No Matches
ion_collection.h File Reference
#include "ion_types.h"

Go to the source code of this file.

Data Structures

struct  _ion_collection_node
struct  _ion_collection

Macros

#define IPCN_DATA_SIZE   sizeof(void *)
#define IPCN_OVERHEAD_SIZE   (sizeof(ION_COLLECTION_NODE) - IPCN_DATA_SIZE)
#define IPCN_pNODE_TO_pDATA(x)
#define IPCN_pDATA_TO_pNODE(x)
#define ION_COLLECTION_IS_EMPTY(collection)
#define ION_COLLECTION_SIZE(pcol)
#define ION_COLLECTION_OPEN(collection, pcursor)
#define ION_COLLECTION_NEXT(pcursor, pbuf)
#define ION_COLLECTION_CLOSE(pcursor)

Typedefs

typedef struct _ion_collection_node ION_COLLECTION_NODE
typedef struct _ion_collection_node * ION_COLLECTION_CURSOR

Macro Definition Documentation

◆ ION_COLLECTION_CLOSE

#define ION_COLLECTION_CLOSE ( pcursor)
Value:
(pcursor) = NULL

◆ ION_COLLECTION_IS_EMPTY

#define ION_COLLECTION_IS_EMPTY ( collection)
Value:
((collection)->_head == NULL)

◆ ION_COLLECTION_NEXT

#define ION_COLLECTION_NEXT ( pcursor,
pbuf )
Value:
if ((pcursor) != NULL) { \
*((void **)&(pbuf)) = IPCN_pNODE_TO_pDATA(pcursor); \
(pcursor) = (pcursor)->_next; \
} else { \
*((void **)&(pbuf)) = NULL; \
}

◆ ION_COLLECTION_OPEN

#define ION_COLLECTION_OPEN ( collection,
pcursor )
Value:
(pcursor) = (collection)->_head

◆ ION_COLLECTION_SIZE

#define ION_COLLECTION_SIZE ( pcol)
Value:
((pcol)->_count)

◆ IPCN_pDATA_TO_pNODE

#define IPCN_pDATA_TO_pNODE ( x)
Value:
((ION_COLLECTION_NODE *) (((uint8_t *)(x)) - IPCN_OVERHEAD_SIZE))

◆ IPCN_pNODE_TO_pDATA

#define IPCN_pNODE_TO_pDATA ( x)
Value:
(&((x)->_data[0]))