#include <RB_Tree.h>
Inheritance diagram for ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >:
Public Member Functions | |
ACE_RB_Tree_Iterator_Base (const ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK > &iter) | |
Copy constructor. | |
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. | |
int | done (void) const |
Returns 1 when the iteration has completed, otherwise 0. | |
ACE_RB_Tree_Node< EXT_ID, INT_ID > & | operator * (void) const |
ACE_RB_Tree_Node< EXT_ID, INT_ID > * | operator-> (void) const |
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. | |
bool | 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. | |
bool | 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. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Protected Member Functions | |
ACE_RB_Tree_Iterator_Base (void) | |
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 (void) | |
Destructor. | |
int | forward_i (void) |
int | reverse_i (void) |
void | dump_i (void) const |
Dump the state of an object. | |
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. | |
ACE_RB_Tree_Node< EXT_ID, INT_ID > * | node_ |
Pointer to the node currently under the iterator. |
Definition at line 592 of file RB_Tree.h.
|
Copy constructor.
Definition at line 1092 of file RB_Tree.cpp. References ACE_TRACE.
|
|
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 733 of file RB_Tree.inl. 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 1059 of file RB_Tree.cpp. References ACE_TRACE, ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::tree_.
01060 : tree_ (&tree), node_ (0) 01061 { 01062 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (ACE_RB_Tree, int)"); 01063 01064 // Position the iterator at the first (or last) node in the tree. 01065 if (set_first) 01066 node_ = tree_->RB_tree_minimum (tree_->root_); 01067 else 01068 node_ = tree_->RB_tree_maximum (tree_->root_); 01069 } |
|
Constructor. Takes an ACE_RB_Tree over which to iterate, and a pointer to a node in the tree. Definition at line 1072 of file RB_Tree.cpp. References ACE_TRACE, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::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 1080 of file RB_Tree.cpp. References ACE_TRACE, ACE_RB_Tree< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::find_i(), and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_.
|
|
Destructor.
Definition at line 1115 of file RB_Tree.cpp. References ACE_TRACE.
01116 { 01117 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::~ACE_RB_Tree_Iterator_Base"); 01118 } |
|
Returns 1 when the iteration has completed, otherwise 0.
Definition at line 743 of file RB_Tree.inl. References ACE_TRACE, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_.
|
|
Dump the state of an object.
Definition at line 1124 of file RB_Tree.cpp. References ACE_BEGIN_DUMP, ACE_DEBUG, ACE_END_DUMP, ACE_TEXT, ACE_TRACE, and LM_DEBUG. Referenced by ACE_RB_Tree_Reverse_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::dump(), and ACE_RB_Tree_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::dump().
|
|
Move forward by one element in the tree. Returns 0 when there are no more elements in the tree, otherwise 1. Definition at line 814 of file RB_Tree.inl. References ACE_TRACE, ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::tree_. Referenced by ACE_RB_Tree_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::advance(), ACE_RB_Tree_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator++(), and ACE_RB_Tree_Reverse_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator--().
|
|
STL-like iterator dereference operator: returns a reference to the node underneath the iterator. Definition at line 756 of file RB_Tree.inl. References ACE_TRACE, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_.
|
|
Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
Definition at line 802 of file RB_Tree.inl. References ACE_TRACE.
|
|
STL-like iterator dereference operator: returns a pointer to the node underneath the iterator. Definition at line 768 of file RB_Tree.inl. References ACE_TRACE, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_.
|
|
Assignment operator: copies both the tree reference and the position in the tree.
Definition at line 1102 of file RB_Tree.cpp. References ACE_TRACE, ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::tree_.
|
|
Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
Definition at line 790 of file RB_Tree.inl. 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 832 of file RB_Tree.inl. References ACE_TRACE, ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::node_, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::tree_. Referenced by ACE_RB_Tree_Reverse_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::advance(), ACE_RB_Tree_Reverse_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator++(), and ACE_RB_Tree_Iterator< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::operator--().
|
|
Returns a const reference to the tree over which we're iterating.
Definition at line 778 of file RB_Tree.inl. References ACE_TRACE, and ACE_RB_Tree_Iterator_Base< EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK >::tree_.
|
|
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 >. |
|
|