39 template <
class type_t>
47 template <
class type_t>
49 ptrentry<type_t> * ptr;
52 for (ptr = p.
root; ptr != NULL; ptr = ptr->next)
append (ptr->data);
56 template <
class type_t>
58 ptrentry<type_t> *
next;
68 template <
class type_t>
70 ptrentry<type_t> * entry =
new ptrentry<type_t> ();
71 if (root) root->prev = entry;
80 template <
class type_t>
82 ptrentry<type_t> * entry =
new ptrentry<type_t> ();
87 for (p = root; p->next != NULL; p = p->next) ;
99 template <
class type_t>
105 template <
class type_t>
107 ptrentry<type_t> *
next = NULL;
108 for (ptrentry<type_t> * p = root; p != NULL; p =
next) {
110 if (p->data == ptr) {
113 if (root) root->prev = NULL;
116 p->prev->next = p->next;
117 if (p->next) p->next->prev = p->prev;
126 template <
class type_t>
129 for (ptrentry<type_t> * p = root; p != NULL; p = p->next) {
130 if (p->data == ptr) count++;
136 template <
class type_t>
139 for (ptrentry<type_t> * p = root; p != NULL; p = p->next, idx++) {
140 if (p->data == ptr)
break;
146 template <
class type_t>
148 ptrentry<type_t> * ptr = root;
149 for (
int i = 0 ;
i < idx && ptr != NULL; ptr = ptr->next,
i++) ;
150 return ptr ? ptr->data : NULL;
154 template <
class type_t>
162 template <
class type_t>
165 _first = _last = _current = NULL;
169 template <
class type_t>
174 template <
class type_t>
176 return _ptrlist->size;
180 template <
class type_t>
182 _current = _first = _ptrlist->root;
183 return _current ? _current->data : NULL;
187 template <
class type_t>
189 for (_last = _ptrlist->root; _last && _last->next; _last = _last->next) ;
191 return _current ? _current->data : NULL;
195 template <
class type_t>
197 _current = _current->next;
198 return _current ? _current->data : NULL;
202 template <
class type_t>
204 _current = _current->prev;
205 return _current ? _current->data : NULL;
209 template <
class type_t>
211 return _current ? _current->data : NULL;
215 template <
class type_t>
217 return _first ? _first->data : NULL;
221 template <
class type_t>
223 return _last ? _last->data : NULL;
type_t * operator++(void)
ptrentry< type_t > * root
type_t * operator--(void)