NAME

ACE_Double_Linked_List_Iterator - Implement an iterator over a container double-linked list

SYNOPSIS

#include <ace/Containers.h>

template<class T> class ACE_Double_Linked_List_Iterator { public: ACE_Double_Linked_List_Iterator (ACE_Double_Linked_List<T> &); T *next (void) const; int advance (void); int first (void); int done (void) const; void dump (void) const; ACE_ALLOC_HOOK_DECLARE; protected: T *not_done (void) const; T *do_advance (void); T *current_; ACE_Double_Linked_List<T> &dllist_; };

DESCRIPTION

Iterate thru the double-linked list. This class provide an interface that let users access the internal element addresses directly, which (IMHO) seems to break the encasulation. Notice class T must delcare ACE_Double_Linked_ListT and ACE_Double_Linked_List_Iterator as friend classes.

Initialization method.

ACE_Double_Linked_List_Iterator (ACE_Double_Linked_List<T> &);

Iteration methods.

T *next (void) const;

int advance (void);

int first (void);

int done (void) const;

void dump (void) const;

ACE_ALLOC_HOOK_DECLARE;

AUTHOR

Doug Schmidt

LIBRARY

ace