ACE  6.3.2
Public Member Functions | Private Attributes | Friends | List of all members
ACE_DLList_Iterator< T > Class Template Reference

A double-linked list container class iterator. More...

#include <Containers_T.h>

Inheritance diagram for ACE_DLList_Iterator< T >:
Inheritance graph
[legend]
Collaboration diagram for ACE_DLList_Iterator< T >:
Collaboration graph
[legend]

Public Member Functions

 ACE_DLList_Iterator (ACE_DLList< T > &l)
 
void reset (ACE_DLList< T > &l)
 
int advance (void)
 
int next (T *&)
 
T * next (void) const
 
int remove (void)
 
void dump (void) const
 Delegates to ACE_Double_Linked_List_Iterator. More...
 
- Public Member Functions inherited from ACE_Double_Linked_List_Iterator< ACE_DLList_Node >
 ACE_Double_Linked_List_Iterator (const ACE_Double_Linked_List< ACE_DLList_Node > &)
 
void reset (ACE_Double_Linked_List< ACE_DLList_Node > &)
 
int first (void)
 
int advance (void)
 
ACE_DLList_Nodeadvance_and_remove (bool dont_remove)
 
ACE_Double_Linked_List_Iterator< ACE_DLList_Node > & operator++ (void)
 Prefix advance. More...
 
ACE_Double_Linked_List_Iterator< ACE_DLList_Nodeoperator++ (int)
 Postfix advance. More...
 
ACE_Double_Linked_List_Iterator< ACE_DLList_Node > & operator-- (void)
 Prefix reverse. More...
 
ACE_Double_Linked_List_Iterator< ACE_DLList_Nodeoperator-- (int)
 Postfix reverse. More...
 
void dump (void) const
 Dump the state of an object. More...
 
- Public Member Functions inherited from ACE_Double_Linked_List_Iterator_Base< ACE_DLList_Node >
int next (ACE_DLList_Node *&) const
 
ACE_DLList_Nodenext (void) const
 
int done (void) const
 Returns 1 when all items have been seen, else 0. More...
 
ACE_DLList_Nodeoperator* (void) const
 
void reset (ACE_Double_Linked_List< ACE_DLList_Node > &)
 

Private Attributes

ACE_DLList< T > * list_
 

Friends

class ACE_DLList< T >
 
class ACE_DLList_Node
 

Additional Inherited Members

- Public Attributes inherited from ACE_Double_Linked_List_Iterator< ACE_DLList_Node >
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...
 
- Public Attributes inherited from ACE_Double_Linked_List_Iterator_Base< ACE_DLList_Node >
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...
 
- Protected Member Functions inherited from ACE_Double_Linked_List_Iterator_Base< ACE_DLList_Node >
 ACE_Double_Linked_List_Iterator_Base (const ACE_Double_Linked_List< ACE_DLList_Node > &)
 Constructor. More...
 
 ACE_Double_Linked_List_Iterator_Base (const ACE_Double_Linked_List_Iterator_Base< ACE_DLList_Node > &iter)
 Copy constructor. More...
 
int go_head (void)
 
int go_tail (void)
 
ACE_DLList_Nodenot_done (void) const
 
ACE_DLList_Nodedo_advance (void)
 
ACE_DLList_Nodedo_retreat (void)
 
void dump_i (void) const
 Dump the state of an object. More...
 
- Protected Attributes inherited from ACE_Double_Linked_List_Iterator_Base< ACE_DLList_Node >
ACE_DLList_Nodecurrent_
 Remember where we are. More...
 
const ACE_Double_Linked_List< ACE_DLList_Node > * dllist_
 

Detailed Description

template<class T>
class ACE_DLList_Iterator< T >

A double-linked list container class iterator.

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.

Constructor & Destructor Documentation

template<class T >
ACE_DLList_Iterator< T >::ACE_DLList_Iterator ( ACE_DLList< T > &  l)
inline

Member Function Documentation

template<class T >
int ACE_DLList_Iterator< T >::advance ( void  )
inline

Move forward by one element in the list. Returns 0 when all the items in the list have been seen, else 1.

template<class T >
void ACE_DLList_Iterator< T >::dump ( void  ) const
inline
template<class T >
int ACE_DLList_Iterator< T >::next ( T *&  ptr)
inline

Pass back the {next_item} that hasn't been seen in the list. Returns 0 when all items have been seen, else 1.

template<class T >
T * ACE_DLList_Iterator< T >::next ( void  ) const
inline
Deprecated:
Delegates to ACE_Double_Linked_List_Iterator, except that whereas the Double_Linked_List version of next returns the node, this next returns the contents of the node
template<class T >
int ACE_DLList_Iterator< T >::remove ( void  )
inline

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.

template<class T >
void ACE_DLList_Iterator< T >::reset ( ACE_DLList< T > &  l)
inline

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?

Friends And Related Function Documentation

template<class T >
friend class ACE_DLList< T >
friend
template<class T >
friend class ACE_DLList_Node
friend

Member Data Documentation

template<class T >
ACE_DLList<T>* ACE_DLList_Iterator< T >::list_
private

The documentation for this class was generated from the following files: