Lines Matching refs:NODE
32 template <typename NODE>
35 NODE* mFirst;
36 NODE* mLast;
41 NODE const* head() const { return mFirst; }
42 NODE* head() { return mFirst; }
43 NODE const* tail() const { return mLast; }
44 NODE* tail() { return mLast; }
46 void insertAfter(NODE* node, NODE* newNode) {
47 newNode->prev = node;
48 newNode->next = node->next;
49 if (node->next == 0) mLast = newNode;
50 else node->next->prev = newNode;
51 node->next = newNode;
54 void insertBefore(NODE* node, NODE* newNode) {
55 newNode->prev = node->prev;
56 newNode->next = node;
57 if (node->prev == 0) mFirst = newNode;
58 else node->prev->next = newNode;
59 node->prev = newNode;
62 void insertHead(NODE* newNode) {
74 void insertTail(NODE* newNode) {
85 NODE* remove(NODE* node) {
86 if (node->prev == 0) mFirst = node->next;
87 else node->prev->next = node->next;
88 if (node->next == 0) mLast = node->prev;
89 else node->next->prev = node->prev;
90 return node;