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

ACE_RB_Tree_Reverse_Iterator Class Template Reference

Implements a reverse iterator for a Red-Black Tree ADT. More...

#include <RB_Tree.h>

Inheritance diagram for ACE_RB_Tree_Reverse_Iterator

Inheritance graph
[legend]
Collaboration diagram for ACE_RB_Tree_Reverse_Iterator:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_RB_Tree_Reverse_Iterator (void)
 ACE_RB_Tree_Reverse_Iterator (const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &tree, int set_last = 1)
 ~ACE_RB_Tree_Reverse_Iterator (void)
 Destructor.

int advance (void)
 Move forward by one element in the tree. Returns 0 when all elements have been seen, else 1.

void dump (void) const
 Dump the state of an object.

ACE_RB_Tree_Reverse_Iterator<
EXT_ID, INT_ID, COMPARE_KEYS,
ACE_LOCK>& 
operator++ (void)
 Prefix advance.

ACE_RB_Tree_Reverse_Iterator<
EXT_ID, INT_ID, COMPARE_KEYS,
ACE_LOCK> 
operator++ (int)
 Postfix advance.

ACE_RB_Tree_Reverse_Iterator<
EXT_ID, INT_ID, COMPARE_KEYS,
ACE_LOCK>& 
operator-- (void)
 Prefix reverse.

ACE_RB_Tree_Reverse_Iterator<
EXT_ID, INT_ID, COMPARE_KEYS,
ACE_LOCK> 
operator-- (int)
 Postfix reverse.

int next (ACE_RB_Tree_Node<EXT_ID, INT_ID> *&next_entry) const

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.


Detailed Description

template<class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK> template class ACE_RB_Tree_Reverse_Iterator

Implements a reverse iterator for a Red-Black Tree ADT.


Constructor & Destructor Documentation

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_INLINE ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >::ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ( void )
 

Create the singular iterator. It is illegal to deference the iterator, no valid iterator is equal to a singular iterator, etc. etc.

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ( const ACE_RB_Tree< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >& tree,
int set_last = 1 )
 

Constructor. Takes an ACE_RB_Tree over which to iterate, and an integer indicating (if non-zero) to position the iterator at the last element in the tree (if this integer is 0, the iterator is positioned at the first element in the tree).

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ( void )
 

Destructor.


Member Function Documentation

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_INLINE int ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >::advance ( void )
 

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

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_INLINE void ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >::dump ( void ) const
 

Dump the state of an object.

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_INLINE int ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >::next ( ACE_RB_Tree_Node< EXT_ID,INT_ID >*& next_entry ) const
 

Passes back the <entry> under the iterator. Returns 0 if the iteration has completed, otherwise 1. This method must be declared and defined in both the derived forward and reverse iterator classes rather than in the base iterator class because of a method signature resolution problem caused by the existence of the deprecated next (void) method in the derived forward iterator class. When that deprecated method is removed, this method should be removed from the derived classes and placed in the base class.

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_INLINE ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK > ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >::operator++ ( int )
 

Postfix advance.

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_INLINE ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >& ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >::operator++ ( void )
 

Prefix advance.

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_INLINE ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK > ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >::operator-- ( int )
 

Postfix reverse.

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_INLINE ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >& ACE_RB_Tree_Reverse_Iterator< EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK >::operator-- ( void )
 

Prefix reverse.


Member Data Documentation

template<classEXT_ID, classINT_ID, classCOMPARE_KEYS, classACE_LOCK>
ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

Reimplemented from ACE_RB_Tree_Iterator_Base.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 10:32:53 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000