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


Public Methods | |
| ACE_DLList_Iterator (ACE_DLList< T > &l) | |
| void | reset (ACE_DLList< T > &l) |
| int | advance (void) |
| Move forward by one element in the list. Returns 0 when all the items in the list have been seen, else 1. More... | |
| int | next (T *&) |
| Pass back the <next_item> that hasn't been seen in the list. Returns 0 when all items have been seen, else 1. More... | |
| T * | next (void) const |
| int | remove (void) |
| void | dump (void) const |
| Delegates to ACE_Double_Linked_List_Iterator. More... | |
Private Attributes | |
| ACE_DLList< T > * | list_ |
Friends | |
| class | ACE_DLList< T > |
| class | ACE_DLList_Node |
This implementation uses ACE_Double_Linked_List_Iterator to perform the logic behind this container class. It delegates all of its calls to ACE_Double_Linked_List_Iterator.
Definition at line 1087 of file Containers_T.h.
|
||||||||||
|
Definition at line 377 of file Containers_T.i.
00378 : ACE_Double_Linked_List_Iterator <ACE_DLList_Node> ((ACE_DLList_Base &)l), 00379 list_ (&l) 00380 { 00381 } |
|
||||||||||
|
Move forward by one element in the list. Returns 0 when all the items in the list have been seen, else 1.
Reimplemented from ACE_Double_Linked_List_Iterator< ACE_DLList_Node >. Definition at line 408 of file Containers_T.i.
00409 {
00410 return this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::advance ();
00411 }
|
|
||||||||||
|
Delegates to ACE_Double_Linked_List_Iterator.
Reimplemented from ACE_Double_Linked_List_Iterator< ACE_DLList_Node >. Definition at line 414 of file Containers_T.i.
00415 {
00416 ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::dump ();
00417 }
|
|
||||||||||
|
Reimplemented from ACE_Double_Linked_List_Iterator_Base< ACE_DLList_Node >. Definition at line 401 of file Containers_T.i. References ACE_DLList_Node::item_.
00402 {
00403 ACE_DLList_Node *temp = ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
00404 return (T *) (temp ? temp->item_ : 0);
00405 }
|
|
||||||||||
|
Pass back the <next_item> that hasn't been seen in the list. Returns 0 when all items have been seen, else 1.
Definition at line 391 of file Containers_T.i. References ACE_DLList_Node::item_.
00392 {
00393 ACE_DLList_Node *temp =
00394 ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
00395 if (temp)
00396 ptr = (T *) temp->item_;
00397 return temp ? 1 : 0;
00398 }
|
|
||||||||||
|
Removes the current item (i.e., <next>) from the list. Note that DLList iterators do not support <advance_and_remove> directly (defined in its base class) and you will need to release the element returned by it. Definition at line 369 of file Containers_T.i. References list_.
00370 {
00371 ACE_DLList_Node *temp = this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
00372 this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::advance ();
00373 return list_->remove (temp);
00374 }
|
|
||||||||||
|
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? Definition at line 384 of file Containers_T.i. References list_.
00385 {
00386 list_ = &l;
00387 this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::reset ((ACE_DLList_Base &)l);
00388 }
|
|
|||||
|
Definition at line 1090 of file Containers_T.h. |
|
|||||
|
Definition at line 1091 of file Containers_T.h. |
|
|||||
|
Definition at line 1137 of file Containers_T.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002