NAME
ACE_Double_Linked_List_Iterator_Base - Implements a common base class for iterators for a double linked list ADT
SYNOPSIS
#include <ace/Containers.h>
template<class T>
class ACE_Double_Linked_List_Iterator_Base
{
public:
int next (T *&) const;
T *next (void) const;
int done (void) const;
T & operator* (void) const;
void reset (ACE_Double_Linked_List<T> &);
ACE_ALLOC_HOOK_DECLARE;
protected:
ACE_Double_Linked_List_Iterator_Base (
ACE_Double_Linked_List<T> &
);
ACE_Double_Linked_List_Iterator_Base (
const ACE_Double_Linked_List_Iterator_Base<T> &iter
);
int go_head (void);
int go_tail (void);
T *not_done (void) const;
T *do_advance (void);
T *do_retreat (void);
void dump_i (void) const;
T *current_;
ACE_Double_Linked_List<T> *dllist_;
};
DESCRIPTION
This implementation of an unordered set uses a fixed array. This implementation does not allow duplicates...
Iteration methods.
int next (T *&) const;
Passes back the entry under the iterator. Returns 0 if the iteration has completed, otherwise 1
T *next (void) const;
Return the address of next (current) unvisited item in the list. 0 if there is no more element available. DEPRECATED
int done (void) const;
Returns 1 when all items have been seen, else 0.
T & operator* (void) const;
STL-like iterator dereference operator: returns a reference to the node underneath the iterator.
void reset (ACE_Double_Linked_List<T> &);
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?
ACE_ALLOC_HOOK_DECLARE;
Declare the dynamic allocation hooks.
Initialization methods.
ACE_Double_Linked_List_Iterator_Base (ACE_Double_Linked_List<T> &);
Constructor
ACE_Double_Linked_List_Iterator_Base (
const ACE_Double_Linked_List_Iterator_Base<T> &iter
);
Copy constructor.
AUTHOR
Doug Schmidt
Initialization and termination methods.
Check boundary conditions.
Classic unordered set operations.
LIBRARY
ace