ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > Class Template ReferenceImplements a common base class for iterators for a Red-Black Tree ADT. More...
Inheritance diagram for ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >:
Detailed Descriptiontemplate<class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
Implements a common base class for iterators for a Red-Black Tree ADT. |
ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::ACE_RB_Tree_Iterator_Base | ( | const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & | iter | ) | [inline] |
Copy constructor.
ACE_INLINE ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::ACE_RB_Tree_Iterator_Base | ( | void | ) | [inline, protected] |
Create the singular iterator. No valid iterator can be equal to it, it is illegal to dereference a singular iterator, etc. etc.
ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::ACE_RB_Tree_Iterator_Base | ( | const ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & | tree, | |
int | set_first | |||
) | [inline, protected] |
Constructor. Takes an ACE_RB_Tree over which to iterate, and an integer indicating (if non-zero) to position the iterator at the first element in the tree (if this integer is 0, the iterator is positioned at the last element in the tree).
ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::ACE_RB_Tree_Iterator_Base | ( | const ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & | tree, | |
ACE_RB_Tree_Node< EXT_ID, INT_ID > * | entry | |||
) | [inline, protected] |
Constructor. Takes an ACE_RB_Tree over which to iterate, and a pointer to a node in the tree.
ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::ACE_RB_Tree_Iterator_Base | ( | const EXT_ID & | key, | |
ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & | tree | |||
) | [inline, protected] |
Constructor. Takes an ACE_RB_Tree over which to iterate, and a key. The key must come first to distinguish the case of EXT_ID == int.
ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::~ACE_RB_Tree_Iterator_Base | ( | void | ) | [inline, protected] |
Destructor.
void ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator= | ( | const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & | iter | ) | [inline] |
Assignment operator: copies both the tree reference and the position in the tree.
ACE_INLINE int ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::done | ( | void | ) | const [inline] |
Returns 1 when the iteration has completed, otherwise 0.
ACE_INLINE ACE_RB_Tree_Node< EXT_ID, INT_ID > & ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator* | ( | void | ) | const [inline] |
STL-like iterator dereference operator: returns a reference to the node underneath the iterator.
ACE_INLINE ACE_RB_Tree_Node< EXT_ID, INT_ID > * ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator-> | ( | void | ) | const [inline] |
STL-like iterator dereference operator: returns a pointer to the node underneath the iterator.
ACE_INLINE const ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::tree | ( | void | ) | [inline] |
Returns a const reference to the tree over which we're iterating.
ACE_INLINE bool ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator== | ( | const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & | rbt | ) | const [inline] |
Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
ACE_INLINE bool ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator!= | ( | const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & | rbt | ) | const [inline] |
Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
ACE_INLINE int ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::forward_i | ( | void | ) | [inline, protected] |
Move forward by one element in the tree. Returns 0 when there are no more elements in the tree, otherwise 1.
ACE_INLINE int ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::reverse_i | ( | void | ) | [inline, protected] |
Move back by one element in the tree. Returns 0 when there are no more elements in the tree, otherwise 1.
void ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::dump_i | ( | void | ) | const [inline, protected] |
Dump the state of an object.
ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
Reimplemented in ACE_RB_Tree_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >, and 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>* ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::tree_ [protected] |
Reference to the ACE_RB_Tree over which we're iterating.
ACE_RB_Tree_Node<EXT_ID, INT_ID>* ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_ [protected] |
Pointer to the node currently under the iterator.