7 #ifndef ELM_INHSTRUCT_DLLIST_H
8 #define ELM_INHSTRUCT_DLLIST_H
10 #include <elm/assert.h>
12 namespace elm {
namespace inhstruct {
22 inline bool atBegin(
void)
const;
23 inline bool atEnd(
void)
const;
28 inline void remove(void);
43 inline bool isEmpty(
void)
const;
44 inline int count(
void)
const;
61 ASSERTP(node,
"null node for replacement");
68 ASSERTP(node,
"null node to insert");
75 ASSERTP(node,
"null node to insert");
86 ASSERTP(!nxt->
atEnd(),
"no next node");
90 ASSERTP(!prv->
atBegin(),
"no previous node");
117 hd.nxt = list.hd.nxt;
120 tl.prv = list.tl.prv;
134 return hd.nxt == &tl;
138 for(
DLNode *cur = hd.nxt; cur != &tl; cur =cur->nxt)
143 ASSERTP(node,
"null node added");
147 ASSERTP(node,
"null node added");
151 ASSERTP(!
isEmpty(),
"list empty");
155 ASSERTP(!
isEmpty(),
"list empty");
162 #endif // ELM_INHSTRUCT_DLLIST_H
bool isEmpty(void) const
Definition: DLList.h:133
DLNode * last(void) const
Definition: DLList.h:130
DLNode * previous(void) const
Definition: DLList.h:57
int count(void) const
Definition: DLList.h:136
void removePrevious(void)
Definition: DLList.h:89
void replace(DLNode *node)
Definition: DLList.h:60
void removeFirst(void)
Definition: DLList.h:150
bool atEnd(void) const
Definition: DLList.h:96
void addFirst(DLNode *node)
Definition: DLList.h:142
DLList(void)
Definition: DLList.h:102
void insertAfter(DLNode *node)
Definition: DLList.h:67
DLNode * next(void) const
Definition: DLList.h:54
void remove(void)
Definition: DLList.h:81
DLNode * first(void) const
Definition: DLList.h:127
void addLast(DLNode *node)
Definition: DLList.h:146
bool atBegin(void) const
Definition: DLList.h:93
void insertBefore(DLNode *node)
Definition: DLList.h:74
void removeLast(void)
Definition: DLList.h:154
void removeNext(void)
Definition: DLList.h:85