Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Double_Linked_List_Iterator_Base Class Template Reference

Implements a common base class for iterators for a double linked list ADT. More...

`#include <Containers_T.h>`

Inheritance diagram for ACE_Double_Linked_List_Iterator_Base:

[legend]
Collaboration diagram for ACE_Double_Linked_List_Iterator_Base:

[legend]
List of all members.

## 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_

## Detailed Description

### template<class T>
class ACE_Double_Linked_List_Iterator_Base< T >

Implements a common base class for iterators for a double linked list ADT.

## Constructor & Destructor Documentation

template<class T>
ACE_Double_Linked_List_Iterator_Base< T >::ACE_Double_Linked_List_Iterator_Base | ( | const ACE_Double_Linked_List< T > & | dll | ) | `[protected]`

| Constructor.

template<class T>
ACE_Double_Linked_List_Iterator_Base< T >::ACE_Double_Linked_List_Iterator_Base | ( | const ACE_Double_Linked_List_Iterator_Base< T > & | iter | ) | `[protected]`

| Copy constructor.

## Member Function Documentation

template<class T>
T * ACE_Double_Linked_List_Iterator_Base< T >::do_advance | ( | void |  | ) | `[protected]`

| Advance to the next element in the list. Return the address of the next element if there are more, 0 otherwise.

template<class T>
T * ACE_Double_Linked_List_Iterator_Base< T >::do_retreat | ( | void |  | ) | `[protected]`

| Retreat to the previous element in the list. Return the address of the previous element if there are more, 0 otherwise.

template<class T>
int ACE_Double_Linked_List_Iterator_Base< T >::done | ( | void |  | ) | const

| Returns 1 when all items have been seen, else 0.

template<class T>
void ACE_Double_Linked_List_Iterator_Base< T >::dump_i | ( | void |  | ) | const`[protected]`

| Dump the state of an object.

template<class T>
int ACE_Double_Linked_List_Iterator_Base< T >::go_head | ( | void |  | ) | `[protected]`

| 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

template<class T>
int ACE_Double_Linked_List_Iterator_Base< T >::go_tail | ( | void |  | ) | `[protected]`

| Move to the last element of the list. Returns 0 if the list is empty, else 1.

template<class T>
T * ACE_Double_Linked_List_Iterator_Base< T >::next | ( | void |  | ) | const

| Deprecated: Return the address of next (current) unvisited item in the list. 0 if there is no more element available. Reimplemented in ACE_DLList_Iterator, and ACE_DLList_Reverse_Iterator.

template<class T>
int ACE_Double_Linked_List_Iterator_Base< T >::next | ( | T *& | ptr | ) | const

| Passes back the <entry> under the iterator. Returns 0 if the iteration has completed, otherwise 1.

template<class T>
T * ACE_Double_Linked_List_Iterator_Base< T >::not_done | ( | void |  | ) | const`[protected]`

| 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.

template<class T>
T & ACE_Double_Linked_List_Iterator_Base< T >::operator * | ( | void |  | ) | const

| STL-like iterator dereference operator: returns a reference to the node underneath the iterator.

template<class T>
void ACE_Double_Linked_List_Iterator_Base< T >::reset | ( | ACE_Double_Linked_List< T > & | dll | ) |

| 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, and ACE_Double_Linked_List_Reverse_Iterator.

## Member Data Documentation

template<class T>
ACE_Double_Linked_List_Iterator_Base::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks. Reimplemented in ACE_Double_Linked_List_Iterator, ACE_Double_Linked_List_Reverse_Iterator, ACE_Double_Linked_List_Iterator< ACE_DLList_Node >, and ACE_Double_Linked_List_Reverse_Iterator< ACE_DLList_Node >.

template<class T>
T* ACE_Double_Linked_List_Iterator_Base::current_`[protected]`

| Remember where we are.

template<class T>
const ACE_Double_Linked_List<T>* ACE_Double_Linked_List_Iterator_Base::dllist_`[protected]`

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

- Containers_T.h
- Containers_T.cpp