]> git.saurik.com Git - wxWidgets.git/blob - include/wx/dlist.h
dcb6e7d7ba09a27ce47223e813d9c1d23ad8b625
[wxWidgets.git] / include / wx / dlist.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: dlist.h
3 // Purpose: wxDList<T> which is a template version of wxList
4 // Author: Robert Roebling
5 // Created: 18.09.2008
6 // Copyright: (c) 2008 wxWidgets team
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_DLIST_H_
11 #define _WX_DLIST_H_
12
13 #include "wx/defs.h"
14 #include "wx/utils.h"
15
16 #if wxUSE_STL
17
18 #include "wx/beforestd.h"
19 #include <algorithm>
20 #include <iterator>
21 #include <list>
22 #include "wx/afterstd.h"
23
24 template<typename T>
25 class wxDList: public std::list<T*>
26 {
27 private:
28 bool m_destroy;
29 typedef std::list<T*> BaseListType;
30 typedef wxDList<T> ListType;
31
32 public:
33 typedef typename BaseListType::iterator iterator;
34
35 class compatibility_iterator
36 {
37 private:
38 /* Workaround for broken VC6 nested class name resolution */
39 typedef typename BaseListType::iterator iterator;
40 friend class wxDList<T>;
41
42 iterator m_iter;
43 ListType *m_list;
44
45 public:
46 compatibility_iterator()
47 : m_iter(), m_list( NULL ) {}
48 compatibility_iterator( ListType* li, iterator i )
49 : m_iter( i ), m_list( li ) {}
50 compatibility_iterator( const ListType* li, iterator i )
51 : m_iter( i ), m_list( const_cast<ListType*>(li) ) {}
52
53 compatibility_iterator* operator->() { return this; }
54 const compatibility_iterator* operator->() const { return this; }
55
56 bool operator==(const compatibility_iterator& i) const
57 {
58 wxASSERT_MSG( m_list && i.m_list,
59 wxT("comparing invalid iterators is illegal") );
60 return (m_list == i.m_list) && (m_iter == i.m_iter);
61 }
62 bool operator!=(const compatibility_iterator& i) const
63 { return !( operator==( i ) ); }
64 operator bool() const
65 { return m_list ? m_iter != m_list->end() : false; }
66 bool operator !() const
67 { return !( operator bool() ); }
68
69 T* GetData() const
70 { return *m_iter; }
71 void SetData( T* e )
72 { *m_iter = e; }
73
74 compatibility_iterator GetNext() const
75 {
76 iterator i = m_iter;
77 return compatibility_iterator( m_list, ++i );
78 }
79 compatibility_iterator GetPrevious() const
80 {
81 if ( m_iter == m_list->begin() )
82 return compatibility_iterator();
83
84 iterator i = m_iter;
85 return compatibility_iterator( m_list, --i );
86 }
87 int IndexOf() const
88 {
89 return *this ? std::distance( m_list->begin(), m_iter )
90 : wxNOT_FOUND;
91 }
92 };
93 public:
94 wxDList() : m_destroy( false ) {}
95
96 ~wxDList() { Clear(); }
97
98 compatibility_iterator Find( const T* e ) const
99 {
100 return compatibility_iterator( this,
101 std::find( const_cast<ListType*>(this)->begin(), const_cast<ListType*>(this)->end(), e ) );
102 }
103
104 bool IsEmpty() const
105 { return this->empty(); }
106 size_t GetCount() const
107 { return this->size(); }
108
109 compatibility_iterator Item( size_t idx ) const
110 {
111 iterator i = const_cast<ListType*>(this)->begin();
112 std::advance( i, idx );
113 return compatibility_iterator( this, i );
114 }
115 T* operator[](size_t idx) const
116 {
117 return Item(idx).GetData();
118 }
119
120 compatibility_iterator GetFirst() const
121 {
122 return compatibility_iterator( this, const_cast<ListType*>(this)->begin() );
123 }
124 compatibility_iterator GetLast() const
125 {
126 iterator i = const_cast<ListType*>(this)->end();
127 return compatibility_iterator( this, !(this->empty()) ? --i : i );
128 }
129 compatibility_iterator Member( T* e ) const
130 { return Find( e ); }
131 compatibility_iterator Nth( int n ) const
132 { return Item( n ); }
133 int IndexOf( T* e ) const
134 { return Find( e ).IndexOf(); }
135
136 compatibility_iterator Append( T* e )
137 {
138 this->push_back( e );
139 return GetLast();
140 }
141 compatibility_iterator Insert( T* e )
142 {
143 this->push_front( e );
144 return compatibility_iterator( this, this->begin() );
145 }
146 compatibility_iterator Insert( compatibility_iterator & i, T* e )
147 {
148 return compatibility_iterator( this, this->insert( i.m_iter, e ) );
149 }
150 compatibility_iterator Insert( size_t idx, T* e )
151 {
152 return compatibility_iterator( this,
153 this->insert( Item( idx ).m_iter, e ) );
154 }
155
156 void DeleteContents( bool destroy )
157 { m_destroy = destroy; }
158 bool GetDeleteContents() const
159 { return m_destroy; }
160 void Erase( const compatibility_iterator& i )
161 {
162 if ( m_destroy )
163 delete i->GetData();
164 this->erase( i.m_iter );
165 }
166 bool DeleteNode( const compatibility_iterator& i )
167 {
168 if( i )
169 {
170 Erase( i );
171 return true;
172 }
173 return false;
174 }
175 bool DeleteObject( T* e )
176 {
177 return DeleteNode( Find( e ) );
178 }
179 void Clear()
180 {
181 if ( m_destroy )
182 {
183 iterator it, en;
184 for ( it = this->begin(), en = this->end(); it != en; ++it )
185 delete *it;
186 }
187 this->clear();
188 }
189 };
190
191 #else // STL
192
193 template<typename T>
194 class wxDList
195 {
196 public:
197 class Node
198 {
199 friend class wxDList<T>;
200 public:
201 Node( wxDList<T> *list = NULL, Node *previous = NULL, Node *next = NULL, T *data = NULL )
202 {
203 m_list = list;
204 m_previous = previous;
205 m_next = next;
206 m_data = data;
207 if (previous)
208 previous->m_next = this;
209 if (next)
210 next->m_previous = this;
211 }
212
213 ~Node()
214 {
215 // handle the case when we're being deleted from the list by
216 // the user (i.e. not by the list itself from DeleteNode) -
217 // we must do it for compatibility with old code
218 if (m_list != NULL)
219 m_list->DetachNode(this);
220 }
221
222 void DeleteData()
223 {
224 delete m_data;
225 }
226
227 Node *GetNext() const { return m_next; }
228 Node *GetPrevious() const { return m_previous; }
229 T *GetData() const { return m_data; }
230 T **GetDataPtr() const { return &(wx_const_cast(nodetype*,this)->m_data); }
231 void SetData( T *data ) { m_data = data; }
232
233 int IndexOf() const
234 {
235 wxCHECK_MSG( m_list, wxNOT_FOUND, wxT("node doesn't belong to a list in IndexOf"));
236
237 int i;
238 Node *prev = m_previous;
239 for( i = 0; prev; i++ )
240 prev = prev->m_previous;
241 return i;
242 }
243
244 private:
245 T *m_data; // user data
246 Node *m_next, // next and previous nodes in the list
247 *m_previous;
248 wxDList<T> *m_list; // list we belong to
249 };
250
251 typedef Node nodetype;
252
253 class compatibility_iterator
254 {
255 public:
256 compatibility_iterator(nodetype *ptr = NULL) : m_ptr(ptr) { }
257 nodetype *operator->() const { return m_ptr; }
258 operator nodetype *() const { return m_ptr; }
259 private:
260 nodetype *m_ptr;
261 };
262
263
264 private:
265 void Init()
266 {
267 m_nodeFirst =
268 m_nodeLast = NULL;
269 m_count = 0;
270 m_destroy = false;
271 }
272
273 void DoDeleteNode( nodetype *node )
274 {
275 if ( m_destroy )
276 node->DeleteData();
277 // so that the node knows that it's being deleted by the list
278 node->m_list = NULL;
279 delete node;
280 }
281
282 size_t m_count; // number of elements in the list
283 bool m_destroy; // destroy user data when deleting list items?
284 nodetype *m_nodeFirst, // pointers to the head and tail of the list
285 *m_nodeLast;
286
287
288 public:
289 wxDList()
290 {
291 Init();
292 }
293
294 wxDList( const wxDList<T>& list )
295 {
296 Init();
297 Assign(list);
298 }
299
300 wxDList( size_t count, T *elements[] )
301 {
302 Init();
303 size_t n;
304 for (n = 0; n < count; n++)
305 Append( elements[n] );
306 }
307
308 wxDList& operator=( const wxDList<T>& list )
309 {
310 if (&list != this)
311 Assign(list);
312 return *this;
313 }
314
315 ~wxDList()
316 {
317 nodetype *each = m_nodeFirst;
318 while ( each != NULL )
319 {
320 nodetype *next = each->GetNext();
321 DoDeleteNode(each);
322 each = next;
323 }
324 }
325
326 void Assign(const wxDList<T> &list)
327 {
328 wxASSERT_MSG( !list.m_destroy,
329 wxT("copying list which owns it's elements is a bad idea") );
330 Clear();
331 m_destroy = list.m_destroy;
332 m_nodeFirst = NULL;
333 m_nodeLast = NULL;
334 nodetype* node;
335 for (node = list.GetFirst(); node; node = node->GetNext() )
336 Append(node->GetData());
337 wxASSERT_MSG( m_count == list.m_count, wxT("logic error in Assign()") );
338 }
339
340 nodetype *Append( T *object )
341 {
342 nodetype *node = new nodetype( this, m_nodeLast, NULL, object );
343
344 if ( !m_nodeFirst )
345 {
346 m_nodeFirst = node;
347 m_nodeLast = m_nodeFirst;
348 }
349 else
350 {
351 m_nodeLast->m_next = node;
352 m_nodeLast = node;
353 }
354 m_count++;
355 return node;
356 }
357
358 nodetype *Insert( T* object )
359 {
360 return Insert( NULL, object );
361 }
362 nodetype *Insert( size_t pos, T* object )
363 {
364 if (pos == m_count)
365 return Append( object );
366 else
367 return Insert( Item(pos), object );
368 }
369 nodetype *Insert( nodetype *position, T* object )
370 {
371 wxCHECK_MSG( !position || position->m_list == this, NULL,
372 wxT("can't insert before a node from another list") );
373
374 // previous and next node for the node being inserted
375 nodetype *prev, *next;
376 if ( position )
377 {
378 prev = position->GetPrevious();
379 next = position;
380 }
381 else
382 {
383 // inserting in the beginning of the list
384 prev = NULL;
385 next = m_nodeFirst;
386 }
387 nodetype *node = new nodetype( this, prev, next, object );
388 if ( !m_nodeFirst )
389 m_nodeLast = node;
390 if ( prev == NULL )
391 m_nodeFirst = node;
392 m_count++;
393 return node;
394 }
395
396
397 nodetype *GetFirst() const
398 {
399 return m_nodeFirst;
400 }
401 nodetype *GetLast() const
402 {
403 return m_nodeLast;
404 }
405 size_t GetCount() const
406 {
407 return m_count;
408 }
409 bool IsEmpty() const
410 {
411 return m_count == 0;
412 }
413
414 void DeleteContents(bool destroy)
415 {
416 m_destroy = destroy;
417 }
418 bool GetDeleteContents() const
419 {
420 return m_destroy;
421 }
422
423 nodetype *Item(size_t index) const
424 {
425 for ( nodetype *current = GetFirst(); current; current = current->GetNext() )
426 {
427 if ( index-- == 0 )
428 return current;
429 }
430 wxFAIL_MSG( wxT("invalid index in Item()") );
431 return NULL;
432 }
433
434 T *operator[](size_t index) const
435 {
436 nodetype *node = Item(index);
437 return node ? node->GetData() : NULL;
438 }
439
440 nodetype *DetachNode( nodetype *node )
441 {
442 wxCHECK_MSG( node, NULL, wxT("detaching NULL wxNodeBase") );
443 wxCHECK_MSG( node->m_list == this, NULL,
444 wxT("detaching node which is not from this list") );
445 // update the list
446 nodetype **prevNext = node->GetPrevious() ? &node->GetPrevious()->m_next
447 : &m_nodeFirst;
448 nodetype **nextPrev = node->GetNext() ? &node->GetNext()->m_previous
449 : &m_nodeLast;
450 *prevNext = node->GetNext();
451 *nextPrev = node->GetPrevious();
452 m_count--;
453 // mark the node as not belonging to this list any more
454 node->m_list = NULL;
455 return node;
456 }
457
458 void Erase( nodetype *node )
459 {
460 DeleteNode(node);
461 }
462 bool DeleteNode( nodetype *node )
463 {
464 if ( !DetachNode(node) )
465 return false;
466 DoDeleteNode(node);
467 return true;
468 }
469
470 bool DeleteObject( T *object )
471 {
472 for ( nodetype *current = GetFirst(); current; current = current->GetNext() )
473 {
474 if ( current->GetData() == object )
475 {
476 DeleteNode(current);
477 return true;
478 }
479 }
480 // not found
481 return false;
482 }
483
484 nodetype *Find(const T *object) const
485 {
486 for ( nodetype *current = GetFirst(); current; current = current->GetNext() )
487 {
488 if ( current->GetData() == object )
489 return current;
490 }
491 // not found
492 return NULL;
493 }
494
495 int IndexOf(const T *object) const
496 {
497 int n = 0;
498 for ( nodetype *current = GetFirst(); current; current = current->GetNext() )
499 {
500 if ( current->GetData() == object )
501 return n;
502 n++;
503 }
504 return wxNOT_FOUND;
505 }
506
507 void Clear()
508 {
509 nodetype *current = m_nodeFirst;
510 while ( current )
511 {
512 nodetype *next = current->GetNext();
513 DoDeleteNode(current);
514 current = next;
515 }
516 m_nodeFirst =
517 m_nodeLast = NULL;
518 m_count = 0;
519 }
520
521 void Reverse()
522 {
523 nodetype * node = m_nodeFirst;
524 nodetype* tmp;
525 while (node)
526 {
527 // swap prev and next pointers
528 tmp = node->m_next;
529 node->m_next = node->m_previous;
530 node->m_previous = tmp;
531 // this is the node that was next before swapping
532 node = tmp;
533 }
534 // swap first and last node
535 tmp = m_nodeFirst; m_nodeFirst = m_nodeLast; m_nodeLast = tmp;
536 }
537
538
539
540 void DeleteNodes(nodetype* first, nodetype* last)
541 {
542 nodetype * node = first;
543 while (node != last)
544 {
545 nodetype* next = node->GetNext();
546 DeleteNode(node);
547 node = next;
548 }
549 }
550
551 void ForEach(wxListIterateFunction F)
552 {
553 for ( nodetype *current = GetFirst(); current; current = current->GetNext() )
554 (*F)(current->GetData());
555 }
556
557 T *FirstThat(wxListIterateFunction F)
558 {
559 for ( nodetype *current = GetFirst(); current; current = current->GetNext() )
560 {
561 if ( (*F)(current->GetData()) )
562 return current->GetData();
563 }
564 return NULL;
565 }
566
567 T *LastThat(wxListIterateFunction F)
568 {
569 for ( nodetype *current = GetLast(); current; current = current->GetPrevious() )
570 {
571 if ( (*F)(current->GetData()) )
572 return current->GetData();
573 }
574 return NULL;
575 }
576
577 /* STL interface */
578 public:
579 typedef size_t size_type;
580 typedef int difference_type;
581 typedef T* value_type;
582 typedef value_type& reference;
583 typedef const value_type& const_reference;
584
585 class iterator
586 {
587 public:
588 typedef nodetype Node;
589 typedef iterator itor;
590 typedef T* value_type;
591 typedef value_type* ptr_type;
592 typedef value_type& reference;
593
594 Node* m_node;
595 Node* m_init;
596 public:
597 typedef reference reference_type;
598 typedef ptr_type pointer_type;
599
600 iterator(Node* node, Node* init) : m_node(node), m_init(init) {}
601 iterator() : m_node(NULL), m_init(NULL) { }
602 reference_type operator*() const
603 { return *m_node->GetDataPtr(); }
604 // ptrop
605 itor& operator++() { m_node = m_node->GetNext(); return *this; }
606 const itor operator++(int)
607 { itor tmp = *this; m_node = m_node->GetNext(); return tmp; }
608 itor& operator--()
609 {
610 m_node = m_node ? m_node->GetPrevious() : m_init;
611 return *this;
612 }
613 const itor operator--(int)
614 {
615 itor tmp = *this;
616 m_node = m_node ? m_node->GetPrevious() : m_init;
617 return tmp;
618 }
619 bool operator!=(const itor& it) const
620 { return it.m_node != m_node; }
621 bool operator==(const itor& it) const
622 { return it.m_node == m_node; }
623 };
624 class const_iterator
625 {
626 public:
627 typedef nodetype Node;
628 typedef T* value_type;
629 typedef const value_type& const_reference;
630 typedef const_iterator itor;
631 typedef value_type* ptr_type;
632
633 Node* m_node;
634 Node* m_init;
635 public:
636 typedef const_reference reference_type;
637 typedef const ptr_type pointer_type;
638
639 const_iterator(Node* node, Node* init)
640 : m_node(node), m_init(init) { }
641 const_iterator() : m_node(NULL), m_init(NULL) { }
642 const_iterator(const iterator& it)
643 : m_node(it.m_node), m_init(it.m_init) { }
644 reference_type operator*() const
645 { return *m_node->GetDataPtr(); }
646 // ptrop
647 itor& operator++() { m_node = m_node->GetNext(); return *this; }
648 const itor operator++(int)
649 { itor tmp = *this; m_node = m_node->GetNext(); return tmp; }
650 itor& operator--()
651 {
652 m_node = m_node ? m_node->GetPrevious() : m_init;
653 return *this;
654 }
655 const itor operator--(int)
656 {
657 itor tmp = *this;
658 m_node = m_node ? m_node->GetPrevious() : m_init;
659 return tmp;
660 }
661 bool operator!=(const itor& it) const
662 { return it.m_node != m_node; }
663 bool operator==(const itor& it) const
664 { return it.m_node == m_node; }
665 };
666 class reverse_iterator
667 {
668 public:
669 typedef nodetype Node;
670 typedef T* value_type;
671 typedef reverse_iterator itor;
672 typedef value_type* ptr_type;
673 typedef value_type& reference;
674
675 Node* m_node;
676 Node* m_init;
677 public:
678 typedef reference reference_type;
679 typedef ptr_type pointer_type;
680
681 reverse_iterator(Node* node, Node* init)
682 : m_node(node), m_init(init) { }
683 reverse_iterator() : m_node(NULL), m_init(NULL) { }
684 reference_type operator*() const
685 { return *m_node->GetDataPtr(); }
686 // ptrop
687 itor& operator++()
688 { m_node = m_node->GetPrevious(); return *this; }
689 const itor operator++(int)
690 { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; }
691 itor& operator--()
692 { m_node = m_node ? m_node->GetNext() : m_init; return *this; }
693 const itor operator--(int)
694 {
695 itor tmp = *this;
696 m_node = m_node ? m_node->GetNext() : m_init;
697 return tmp;
698 }
699 bool operator!=(const itor& it) const
700 { return it.m_node != m_node; }
701 bool operator==(const itor& it) const
702 { return it.m_node == m_node; }
703 };
704 class const_reverse_iterator
705 {
706 public:
707 typedef nodetype Node;
708 typedef T* value_type;
709 typedef const_reverse_iterator itor;
710 typedef value_type* ptr_type;
711 typedef const value_type& const_reference;
712
713 Node* m_node;
714 Node* m_init;
715 public:
716 typedef const_reference reference_type;
717 typedef const ptr_type pointer_type;
718
719 const_reverse_iterator(Node* node, Node* init)
720 : m_node(node), m_init(init) { }
721 const_reverse_iterator() : m_node(NULL), m_init(NULL) { }
722 const_reverse_iterator(const reverse_iterator& it)
723 : m_node(it.m_node), m_init(it.m_init) { }
724 reference_type operator*() const
725 { return *m_node->GetDataPtr(); }
726 // ptrop
727 itor& operator++()
728 { m_node = m_node->GetPrevious(); return *this; }
729 const itor operator++(int)
730 { itor tmp = *this; m_node = m_node->GetPrevious(); return tmp; }
731 itor& operator--()
732 { m_node = m_node ? m_node->GetNext() : m_init; return *this;}
733 const itor operator--(int)
734 {
735 itor tmp = *this;
736 m_node = m_node ? m_node->GetNext() : m_init;
737 return tmp;
738 }
739 bool operator!=(const itor& it) const
740 { return it.m_node != m_node; }
741 bool operator==(const itor& it) const
742 { return it.m_node == m_node; }
743 };
744
745 wxEXPLICIT wxDList(size_type n, const_reference v = value_type())
746 { assign(n, v); }
747 wxDList(const const_iterator& first, const const_iterator& last)
748 { assign(first, last); }
749 iterator begin() { return iterator(GetFirst(), GetLast()); }
750 const_iterator begin() const
751 { return const_iterator(GetFirst(), GetLast()); }
752 iterator end() { return iterator(NULL, GetLast()); }
753 const_iterator end() const { return const_iterator(NULL, GetLast()); }
754 reverse_iterator rbegin()
755 { return reverse_iterator(GetLast(), GetFirst()); }
756 const_reverse_iterator rbegin() const
757 { return const_reverse_iterator(GetLast(), GetFirst()); }
758 reverse_iterator rend() { return reverse_iterator(NULL, GetFirst()); }
759 const_reverse_iterator rend() const
760 { return const_reverse_iterator(NULL, GetFirst()); }
761 void resize(size_type n, value_type v = value_type())
762 {
763 while (n < size())
764 pop_back();
765 while (n > size())
766 push_back(v);
767 }
768 size_type size() const { return GetCount(); }
769 size_type max_size() const { return INT_MAX; }
770 bool empty() const { return IsEmpty(); }
771 reference front() { return *begin(); }
772 const_reference front() const { return *begin(); }
773 reference back() { iterator tmp = end(); return *--tmp; }
774 const_reference back() const { const_iterator tmp = end(); return *--tmp; }
775 void push_front(const_reference v = value_type())
776 { Insert(GetFirst(), v); }
777 void pop_front() { DeleteNode(GetFirst()); }
778 void push_back(const_reference v = value_type())
779 { Append( v ); }
780 void pop_back() { DeleteNode(GetLast()); }
781 void assign(const_iterator first, const const_iterator& last)
782 {
783 clear();
784 for(; first != last; ++first)
785 Append(*first);
786 }
787 void assign(size_type n, const_reference v = value_type())
788 {
789 clear();
790 for(size_type i = 0; i < n; ++i)
791 Append(v);
792 }
793 iterator insert(const iterator& it, const_reference v = value_type())
794 {
795 Insert(it.m_node,v);
796 iterator itprev(it);
797 return itprev--;
798 }
799 void insert(const iterator& it, size_type n, const_reference v = value_type())
800 {
801 for(size_type i = 0; i < n; ++i)
802 Insert(it.m_node, v);
803 }
804 void insert(const iterator& it, const_iterator first, const const_iterator& last)
805 {
806 for(; first != last; ++first)
807 Insert(it.m_node, *first);
808 }
809 iterator erase(const iterator& it)
810 {
811 iterator next = iterator(it.m_node->GetNext(), GetLast());
812 DeleteNode(it.m_node); return next;
813 }
814 iterator erase(const iterator& first, const iterator& last)
815 {
816 iterator next = last; ++next;
817 DeleteNodes(first.m_node, last.m_node);
818 return next;
819 }
820 void clear() { Clear(); }
821 void splice(const iterator& it, wxDList<T>& l, const iterator& first, const iterator& last)
822 { insert(it, first, last); l.erase(first, last); }
823 void splice(const iterator& it, wxDList<T>& l)
824 { splice(it, l, l.begin(), l.end() ); }
825 void splice(const iterator& it, wxDList<T>& l, const iterator& first)
826 {
827 iterator tmp = first; ++tmp;
828 if(it == first || it == tmp) return;
829 insert(it, *first);
830 l.erase(first);
831 }
832 void remove(const_reference v)
833 { DeleteObject(v); }
834 void reverse()
835 { Reverse(); }
836 /* void swap(list<T>& l)
837 {
838 { size_t t = m_count; m_count = l.m_count; l.m_count = t; }
839 { bool t = m_destroy; m_destroy = l.m_destroy; l.m_destroy = t; }
840 { wxNodeBase* t = m_nodeFirst; m_nodeFirst = l.m_nodeFirst; l.m_nodeFirst = t; }
841 { wxNodeBase* t = m_nodeLast; m_nodeLast = l.m_nodeLast; l.m_nodeLast = t; }
842 { wxKeyType t = m_keyType; m_keyType = l.m_keyType; l.m_keyType = t; }
843 } */
844 };
845
846 #endif
847
848 #endif // _WX_DLIST_H_