Lines Matching refs:NODE
33 template <typename NODE>
36 NODE* mFirst;
37 NODE* mLast;
42 NODE const* head() const { return mFirst; }
43 NODE* head() { return mFirst; }
44 NODE const* tail() const { return mLast; }
45 NODE* tail() { return mLast; }
47 void insertAfter(NODE* node, NODE* newNode) {
48 newNode->prev = node;
49 newNode->next = node->next;
50 if (node->next == 0) mLast = newNode;
51 else node->next->prev = newNode;
52 node->next = newNode;
55 void insertBefore(NODE* node, NODE* newNode) {
56 newNode->prev = node->prev;
57 newNode->next = node;
58 if (node->prev == 0) mFirst = newNode;
59 else node->prev->next = newNode;
60 node->prev = newNode;
63 void insertHead(NODE* newNode) {
75 void insertTail(NODE* newNode) {
86 NODE* remove(NODE* node) {
87 if (node->prev == 0) mFirst = node->next;
88 else node->prev->next = node->next;
89 if (node->next == 0) mLast = node->prev;
90 else node->next->prev = node->prev;
91 return node;