#include <RB_Tree.h>
Inheritance diagram for ACE_RB_Tree_Iterator_Base:


Public Methods | |
| void | operator= (const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > &iter) |
| Assignment operator: copies both the tree reference and the position in the tree. More... | |
| int | done (void) const |
| Returns 1 when the iteration has completed, otherwise 0. More... | |
| ACE_RB_Tree_Node< EXT_ID, INT_ID > & | operator * (void) const |
| STL-like iterator dereference operator: returns a reference to the node underneath the iterator. More... | |
| const ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > & | tree (void) |
| Returns a const reference to the tree over which we're iterating. More... | |
| int | operator== (const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > &) const |
| Comparison operator: returns 1 if both iterators point to the same position, otherwise 0. More... | |
| int | operator!= (const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > &) const |
| Comparison operator: returns 1 if the iterators point to different positions, otherwise 0. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Protected Methods | |
| ACE_RB_Tree_Iterator_Base (void) | |
| Create the singular iterator. No valid iterator can be equal to it, it is illegal to dereference a singular iterator, etc. etc. More... | |
| ACE_RB_Tree_Iterator_Base (const ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > &tree, int set_first) | |
| 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) | |
| ACE_RB_Tree_Iterator_Base (const EXT_ID &key, ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > &tree) | |
| ACE_RB_Tree_Iterator_Base (const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > &iter) | |
| Copy constructor. More... | |
| ~ACE_RB_Tree_Iterator_Base (void) | |
| Destructor. More... | |
| int | forward_i (void) |
| Move forward by one element in the tree. Returns 0 when there are no more elements in the tree, otherwise 1. More... | |
| int | reverse_i (void) |
| Move back by one element in the tree. Returns 0 when there are no more elements in the tree, otherwise 1. More... | |
| void | dump_i (void) const |
| Dump the state of an object. More... | |
Protected Attributes | |
| const ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > * | tree_ |
| Reference to the ACE_RB_Tree over which we're iterating. More... | |
| ACE_RB_Tree_Node< EXT_ID, INT_ID > * | node_ |
| Pointer to the node currently under the iterator. More... | |
Definition at line 557 of file RB_Tree.h.
|
||||||||||
|
Create the singular iterator. No valid iterator can be equal to it, it is illegal to dereference a singular iterator, etc. etc.
Definition at line 720 of file RB_Tree.i. References ACE_TRACE.
|
|
||||||||||||||||
|
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). Definition at line 996 of file RB_Tree.cpp. References ACE_TRACE, node_, and tree_.
00997 : tree_ (&tree), node_ (0) 00998 { 00999 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (ACE_RB_Tree, int)"); 01000 01001 // Position the iterator at the first (or last) node in the tree. 01002 if (set_first) 01003 node_ = tree_->RB_tree_minimum (tree_->root_); 01004 else 01005 node_ = tree_->RB_tree_maximum (tree_->root_); 01006 } |
|
||||||||||||||||
|
Constructor. Takes an ACE_RB_Tree over which to iterate, and a pointer to a node in the tree. Definition at line 1009 of file RB_Tree.cpp. References ACE_TRACE, and node_.
|
|
||||||||||||||||
|
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. Definition at line 1017 of file RB_Tree.cpp. References ACE_TRACE, node_, and tree.
|
|
||||||||||
|
Copy constructor.
Definition at line 1029 of file RB_Tree.cpp. References ACE_TRACE.
|
|
||||||||||
|
Destructor.
Definition at line 1052 of file RB_Tree.cpp. References ACE_TRACE.
01053 {
01054 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Iterator_Base");
01055 }
|
|
||||||||||
|
Returns 1 when the iteration has completed, otherwise 0.
Definition at line 730 of file RB_Tree.i. References ACE_TRACE, and node_.
|
|
||||||||||
|
Dump the state of an object.
Definition at line 824 of file RB_Tree.i. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_LIB_TEXT, ACE_TRACE, and LM_DEBUG. Referenced by ACE_RB_Tree_Reverse_Iterator::dump, and ACE_RB_Tree_Iterator::dump.
00825 {
00826 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump_i");
00827
00828 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00829 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nnode_ = %x\n"), this->node_));
00830 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00831 }
|
|
||||||||||
|
Move forward by one element in the tree. Returns 0 when there are no more elements in the tree, otherwise 1.
Definition at line 789 of file RB_Tree.i. References ACE_TRACE, node_, and tree_. Referenced by ACE_RB_Tree_Iterator::advance, ACE_RB_Tree_Iterator::operator++, and ACE_RB_Tree_Reverse_Iterator::operator--.
|
|
||||||||||
|
STL-like iterator dereference operator: returns a reference to the node underneath the iterator.
Definition at line 743 of file RB_Tree.i. References ACE_TRACE, and node_.
|
|
||||||||||
|
Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
Definition at line 777 of file RB_Tree.i. References ACE_TRACE.
|
|
||||||||||
|
Assignment operator: copies both the tree reference and the position in the tree.
Definition at line 1039 of file RB_Tree.cpp. References ACE_TRACE, node_, and tree_.
|
|
||||||||||
|
Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
Definition at line 765 of file RB_Tree.i. References ACE_TRACE.
|
|
||||||||||
|
Move back by one element in the tree. Returns 0 when there are no more elements in the tree, otherwise 1.
Definition at line 807 of file RB_Tree.i. References ACE_TRACE, node_, and tree_. Referenced by ACE_RB_Tree_Reverse_Iterator::advance, ACE_RB_Tree_Reverse_Iterator::operator++, and ACE_RB_Tree_Iterator::operator--.
|
|
||||||||||
|
Returns a const reference to the tree over which we're iterating.
Definition at line 753 of file RB_Tree.i. References ACE_TRACE, and tree_. Referenced by ACE_RB_Tree_Iterator_Base.
|
|
|||||
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_RB_Tree_Iterator. |
|
|||||
|
Pointer to the node currently under the iterator.
Definition at line 642 of file RB_Tree.h. Referenced by ACE_RB_Tree_Iterator_Base, done, ACE_RB_Tree_Iterator::first, forward_i, ACE_RB_Tree_Iterator::is_done, ACE_RB_Tree_Iterator::item, ACE_RB_Tree_Iterator::key, ACE_RB_Tree_Iterator::last, ACE_RB_Tree_Reverse_Iterator::next, ACE_RB_Tree_Iterator::next, operator *, operator=, ACE_RB_Tree_Iterator::previous, and reverse_i. |
|
|||||
|
Reference to the ACE_RB_Tree over which we're iterating.
Definition at line 639 of file RB_Tree.h. Referenced by ACE_RB_Tree_Iterator_Base, ACE_RB_Tree_Iterator::first, forward_i, ACE_RB_Tree_Iterator::last, ACE_RB_Tree_Iterator::next, operator=, ACE_RB_Tree_Iterator::previous, reverse_i, and tree. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002