Classes | Macros | Typedefs | Functions
list.h File Reference
#include <string.h>
#include <ccd/compiler.h>
Include dependency graph for list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ccd_list_t
 

Macros

#define ccdListEntry(ptr, type, member)   ccd_container_of(ptr, type, member)
 
#define ccdListForEach(list, item)
 
#define ccdListForEachEntry(head, pos, postype, member)
 
#define ccdListForEachEntrySafe(head, pos, postype, n, ntype, member)
 
#define ccdListForEachSafe(list, item, tmp)
 

Typedefs

typedef struct _ccd_list_t ccd_list_t
 

Functions

_ccd_inline void ccdListAppend (ccd_list_t *l, ccd_list_t *item)
 
_ccd_inline void ccdListDel (ccd_list_t *item)
 
_ccd_inline int ccdListEmpty (const ccd_list_t *head)
 
_ccd_inline void ccdListInit (ccd_list_t *l)
 
_ccd_inline ccd_list_tccdListNext (ccd_list_t *l)
 
_ccd_inline ccd_list_tccdListPrev (ccd_list_t *l)
 

Macro Definition Documentation

◆ ccdListEntry

#define ccdListEntry (   ptr,
  type,
  member 
)    ccd_container_of(ptr, type, member)

Get the struct for this entry. @ptr: the &ccd_list_t pointer. @type: the type of the struct this is embedded in. @member: the name of the list_struct within the struct.

Definition at line 41 of file list.h.

◆ ccdListForEach

#define ccdListForEach (   list,
  item 
)
Value:
for (item = (list)->next; \
_ccd_prefetch((item)->next), item != (list); \
item = (item)->next)

Iterates over list.

Definition at line 47 of file list.h.

◆ ccdListForEachEntry

#define ccdListForEachEntry (   head,
  pos,
  postype,
  member 
)
Value:
for (pos = ccdListEntry((head)->next, postype, member); \
_ccd_prefetch(pos->member.next), &pos->member != (head); \
pos = ccdListEntry(pos->member.next, postype, member))

Iterates over list of given type. @pos: the type * to use as a loop cursor. @head: the head for your list. @member: the name of the list_struct within the struct.

Definition at line 66 of file list.h.

◆ ccdListForEachEntrySafe

#define ccdListForEachEntrySafe (   head,
  pos,
  postype,
  n,
  ntype,
  member 
)
Value:
for (pos = ccdListEntry((head)->next, postype, member), \
n = ccdListEntry(pos->member.next, postype, member); \
&pos->member != (head); \
pos = n, n = ccdListEntry(n->member.next, ntype, member))

Iterates over list of given type safe against removal of list entry @pos: the type * to use as a loop cursor.
: another type * to use as temporary storage @head: the head for your list. @member: the name of the list_struct within the struct.

Definition at line 78 of file list.h.

◆ ccdListForEachSafe

#define ccdListForEachSafe (   list,
  item,
  tmp 
)
Value:
for (item = (list)->next, tmp = (item)->next; \
item != (list); \
item = tmp, tmp = (item)->next)

Iterates over list safe against remove of list entry

Definition at line 55 of file list.h.

Typedef Documentation

◆ ccd_list_t

typedef struct _ccd_list_t ccd_list_t

Definition at line 31 of file list.h.

Function Documentation

◆ ccdListAppend()

_ccd_inline void ccdListAppend ( ccd_list_t l,
ccd_list_t item 
)

Appends item to end of the list l.

Definition at line 135 of file list.h.

◆ ccdListDel()

_ccd_inline void ccdListDel ( ccd_list_t item)

Removes item from list.

Definition at line 143 of file list.h.

◆ ccdListEmpty()

_ccd_inline int ccdListEmpty ( const ccd_list_t head)

Returns true if list is empty.

Definition at line 130 of file list.h.

◆ ccdListInit()

_ccd_inline void ccdListInit ( ccd_list_t l)

Initialize list.

INLINES:

Definition at line 114 of file list.h.

◆ ccdListNext()

_ccd_inline ccd_list_t * ccdListNext ( ccd_list_t l)

Definition at line 120 of file list.h.

◆ ccdListPrev()

_ccd_inline ccd_list_t * ccdListPrev ( ccd_list_t l)

Definition at line 125 of file list.h.

next
EndPoint * next[3]
the next end point in the end point list
Definition: broadphase_SaP.h:190
ccdListEntry
#define ccdListEntry(ptr, type, member)
Definition: list.h:41


fcl
Author(s):
autogenerated on Fri Apr 2 2021 02:38:01