#include <Containers_T.h>
Inheritance diagram for ACE_Double_Linked_List_Iterator_Base:


Public Methods | |
| int | next (T *&) const |
| Passes back the <entry> under the iterator. Returns 0 if the iteration has completed, otherwise 1. More... | |
| T * | next (void) const |
| int | done (void) const |
| Returns 1 when all items have been seen, else 0. More... | |
| T & | operator * (void) const |
| STL-like iterator dereference operator: returns a reference to the node underneath the iterator. More... | |
| void | reset (ACE_Double_Linked_List< T > &) |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Protected Methods | |
| ACE_Double_Linked_List_Iterator_Base (const ACE_Double_Linked_List< T > &) | |
| Constructor. More... | |
| ACE_Double_Linked_List_Iterator_Base (const ACE_Double_Linked_List_Iterator_Base< T > &iter) | |
| Copy constructor. More... | |
| int | go_head (void) |
| int | go_tail (void) |
| Move to the last element of the list. Returns 0 if the list is empty, else 1. More... | |
| T * | not_done (void) const |
| T * | do_advance (void) |
| Advance to the next element in the list. Return the address of the next element if there are more, 0 otherwise. More... | |
| T * | do_retreat (void) |
| Retreat to the previous element in the list. Return the address of the previous element if there are more, 0 otherwise. More... | |
| void | dump_i (void) const |
| Dump the state of an object. More... | |
Protected Attributes | |
| T * | current_ |
| Remember where we are. More... | |
| const ACE_Double_Linked_List< T > * | dllist_ |
Definition at line 556 of file Containers_T.h.
|
||||||||||
|
Constructor.
Definition at line 339 of file Containers_T.cpp.
|
|
||||||||||
|
Copy constructor.
Definition at line 346 of file Containers_T.cpp.
|
|
||||||||||
|
Advance to the next element in the list. Return the address of the next element if there are more, 0 otherwise.
Definition at line 413 of file Containers_T.cpp. References current_, and not_done. Referenced by ACE_Double_Linked_List_Iterator::advance, ACE_Double_Linked_List_Iterator::advance_and_remove, ACE_Double_Linked_List_Iterator::operator++, and ACE_Double_Linked_List_Reverse_Iterator::operator--.
|
|
||||||||||
|
Retreat to the previous element in the list. Return the address of the previous element if there are more, 0 otherwise.
Definition at line 425 of file Containers_T.cpp. References current_, and not_done. Referenced by ACE_Double_Linked_List_Reverse_Iterator::advance, ACE_Double_Linked_List_Reverse_Iterator::advance_and_remove, ACE_Double_Linked_List_Reverse_Iterator::operator++, and ACE_Double_Linked_List_Iterator::operator--.
|
|
||||||||||
|
||||||||||
|
Dump the state of an object.
Definition at line 437 of file Containers_T.cpp. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, and LM_DEBUG. Referenced by ACE_Double_Linked_List_Reverse_Iterator::dump, and ACE_Double_Linked_List_Iterator::dump.
00438 {
00439 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00440 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("current_ = %x"), this->current_));
00441 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00442 }
|
|
||||||||||
|
Move to the first element of the list. Returns 0 if the list is empty, else 1. Note: the head of the ACE_DLList is actually a null entry, so the first element is actually the 2n'd entry Definition at line 390 of file Containers_T.cpp. References current_, and dllist_. Referenced by ACE_Double_Linked_List_Iterator::first.
|
|
||||||||||
|
Move to the last element of the list. Returns 0 if the list is empty, else 1.
Definition at line 397 of file Containers_T.cpp. References current_, and dllist_. Referenced by ACE_Double_Linked_List_Reverse_Iterator::first.
|
|
||||||||||
|
Reimplemented in ACE_DLList_Iterator. Definition at line 355 of file Containers_T.cpp. References not_done. Referenced by ACE_Double_Linked_List_Reverse_Iterator::advance_and_remove, and ACE_Double_Linked_List_Iterator::advance_and_remove.
00356 {
00357 return this->not_done ();
00358 }
|
|
||||||||||
|
||||||||||
|
Check if we reach the end of the list. Can also be used to get the *current* element in the list. Return the address of the current item if there are still elements left , 0 if we run out of element. Definition at line 404 of file Containers_T.cpp. References current_, and dllist_. Referenced by do_advance, do_retreat, done, next, and operator *.
|
|
||||||||||
|
STL-like iterator dereference operator: returns a reference to the node underneath the iterator.
Definition at line 375 of file Containers_T.cpp. References not_done.
00376 {
00377 return *(this->not_done ());
00378 }
|
|
||||||||||
|
Retasks the iterator to iterate over a new Double_Linked_List. This allows clients to reuse an iterator without incurring the constructor overhead. If you do use this, be aware that if there are more than one reference to this iterator, the other "clients" may be very bothered when their iterator changes. @ Here be dragons. Comments? Reimplemented in ACE_Double_Linked_List_Iterator. Definition at line 383 of file Containers_T.cpp. References current_, and dllist_.
|
|
|||||
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Double_Linked_List_Iterator. Definition at line 589 of file Containers_T.h. |
|
|||||
|
Remember where we are.
Definition at line 634 of file Containers_T.h. Referenced by ACE_Double_Linked_List_Iterator::ACE_Double_Linked_List_Iterator, ACE_Double_Linked_List_Reverse_Iterator::ACE_Double_Linked_List_Reverse_Iterator, do_advance, do_retreat, go_head, go_tail, not_done, ACE_Double_Linked_List_Reverse_Iterator::reset, ACE_Double_Linked_List_Iterator::reset, and reset. |
|
|||||
|
Definition at line 636 of file Containers_T.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002