Orxonox  0.0.5 Codename: Arcturus
list.h
Go to the documentation of this file.
1 
5 #ifndef __ENET_LIST_H__
6 #define __ENET_LIST_H__
7 
8 #include <stdlib.h>
9 
10 typedef struct _ENetListNode
11 {
12  struct _ENetListNode * next;
14 } ENetListNode;
15 
17 
18 typedef struct _ENetList
19 {
21 } ENetList;
22 
23 extern void enet_list_clear (ENetList *);
24 
26 extern void * enet_list_remove (ENetListIterator);
27 extern ENetListIterator enet_list_move (ENetListIterator, void *, void *);
28 
29 extern size_t enet_list_size (ENetList *);
30 
31 #define enet_list_begin(list) ((list) -> sentinel.next)
32 #define enet_list_end(list) (& (list) -> sentinel)
33 
34 #define enet_list_empty(list) (enet_list_begin (list) == enet_list_end (list))
35 
36 #define enet_list_next(iterator) ((iterator) -> next)
37 #define enet_list_previous(iterator) ((iterator) -> previous)
38 
39 #define enet_list_front(list) ((void *) (list) -> sentinel.next)
40 #define enet_list_back(list) ((void *) (list) -> sentinel.previous)
41 
42 #endif /* __ENET_LIST_H__ */
43 
ENetListNode * ENetListIterator
Definition: list.h:16
struct _ENetListNode ENetListNode
ENetListIterator enet_list_move(ENetListIterator, void *, void *)
Definition: list.c:44
ENetListIterator enet_list_insert(ENetListIterator, void *)
Definition: list.c:21
Definition: list.h:10
void enet_list_clear(ENetList *)
Definition: list.c:14
struct _ENetListNode * next
Definition: list.h:12
ENetListNode sentinel
Definition: list.h:20
size_t enet_list_size(ENetList *)
Definition: list.c:62
void * enet_list_remove(ENetListIterator)
Definition: list.c:35
struct _ENetList ENetList
struct _ENetListNode * previous
Definition: list.h:13
Definition: list.h:18