2 #include "ace/Guard_T.h"
3 #include "ace/Malloc_Base.h"
4 #include "ace/Log_Category.h"
6 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
8 /////////////////////////////////////////////////////
9 // template class ACE_RB_Tree_Node<EXT_ID, INT_ID> //
10 /////////////////////////////////////////////////////
13 template <class EXT_ID, class INT_ID>
15 ACE_RB_Tree_Node<EXT_ID, INT_ID>::key ()
17 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::key");
22 template <class EXT_ID, class INT_ID>
24 ACE_RB_Tree_Node<EXT_ID, INT_ID>::item ()
26 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>:item");
30 // Set color of the node.
31 template <class EXT_ID, class INT_ID>
33 ACE_RB_Tree_Node<EXT_ID, INT_ID>::color (ACE_RB_Tree_Node_Base::RB_Tree_Node_Color c)
35 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::color mutator");
39 // Get color of the node.
40 template <class EXT_ID, class INT_ID>
41 ACE_INLINE ACE_RB_Tree_Node_Base::RB_Tree_Node_Color
42 ACE_RB_Tree_Node<EXT_ID, INT_ID>::color ()
44 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::color accessor");
48 // Accessor for node's parent pointer.
49 template <class EXT_ID, class INT_ID>
50 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
51 ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent ()
53 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent accessor");
57 // Mutator for node's parent pointer.
58 template <class EXT_ID, class INT_ID>
60 ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent (ACE_RB_Tree_Node<EXT_ID, INT_ID> * p)
62 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent mutator");
66 // Accessor for node's left child pointer.
67 template <class EXT_ID, class INT_ID>
68 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
69 ACE_RB_Tree_Node<EXT_ID, INT_ID>::left ()
71 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::left accessor");
75 // Mutator for node's left child pointer.
76 template <class EXT_ID, class INT_ID>
78 ACE_RB_Tree_Node<EXT_ID, INT_ID>::left (ACE_RB_Tree_Node<EXT_ID, INT_ID> * l)
80 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::left mutator");
84 // Accessor for node's right child pointer.
85 template <class EXT_ID, class INT_ID>
86 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
87 ACE_RB_Tree_Node<EXT_ID, INT_ID>::right ()
89 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::right accessor");
93 // Mutator for node's right child pointer.
94 template <class EXT_ID, class INT_ID>
96 ACE_RB_Tree_Node<EXT_ID, INT_ID>::right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * r)
98 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::right mutator");
102 ////////////////////////////////////////////////////////////////////////
103 // template class ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
104 ////////////////////////////////////////////////////////////////////////
107 // Initialize an RB Tree.
109 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
111 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::open (ACE_Allocator *alloc)
113 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::open");
114 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
116 // Calling this->close_i () ensures we release previously allocated
117 // memory before allocating new memory.
120 // If we were passed an allocator use it,
121 // otherwise use the default instance.
124 alloc = ACE_Allocator::instance ();
126 this->allocator_ = alloc;
131 // Close down an RB_Tree and release dynamically allocated
133 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
135 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close ()
137 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close");
138 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
140 return this->close_i ();
143 // Associate <ext_id> with <int_id>. If <ext_id> is already in the
144 // tree then the <ACE_RB_Tree_Node> is not changed. Returns 0 if a
145 // new entry is bound successfully, returns 1 if an attempt is made
146 // to bind an existing entry, and returns -1 if failures occur.
147 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
149 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
150 const INT_ID &int_id)
152 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &item, const INT_ID &int_id)");
153 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
155 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
156 return this->insert_i (ext_id, int_id, entry);
159 // Same as a normal bind, except the tree entry is also passed back
160 // to the caller. The entry in this case will either be the newly
161 // created entry, or the existing one.
162 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
164 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
165 const INT_ID &int_id,
166 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
168 ACE_TRACE ("ACE_RB_Tree::bind (const EXT_ID &ext_id, const INT_ID &int_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
169 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
171 return this->insert_i (ext_id, int_id, entry);
174 // Associate <ext_id> with <int_id> if and only if <ext_id> is not
175 // in the tree. If <ext_id> is already in the tree then the <int_id>
176 // parameter is assigned the existing value in the tree. Returns 0
177 // if a new entry is bound successfully, returns 1 if an attempt is
178 // made to bind an existing entry, and returns -1 if failures occur.
179 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
181 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
184 ACE_TRACE ("ACE_RB_Tree::trybind (const EXT_ID &ext_id, INT_ID &int_id)");
185 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
187 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
188 int result = this->insert_i (ext_id, int_id, entry);
192 int_id = entry->item ();
198 // Same as a normal trybind, except the tree entry is also passed
199 // back to the caller. The entry in this case will either be the
200 // newly created entry, or the existing one.
201 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
203 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
205 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
207 ACE_TRACE ("ACE_RB_Tree::trybind (const EXT_ID &ext_id, INT_ID &int_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
208 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
210 int const result = this->insert_i (ext_id, int_id, entry);
214 int_id = entry->item ();
221 // Reassociate <ext_id> with <int_id>. If <ext_id> is not in the
222 // tree then behaves just like <bind>. Returns 0 if a new entry is
223 // bound successfully, returns 1 if an existing entry was rebound,
224 // and returns -1 if failures occur.
226 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
228 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
229 const INT_ID &int_id)
231 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id)");
232 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
234 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
235 int result = this->insert_i (ext_id, int_id, entry);
239 entry->key () = ext_id;
240 entry->item () = int_id;
246 // Same as a normal rebind, except the tree entry is also passed back
247 // to the caller. The entry in this case will either be the newly
248 // created entry, or the existing one.
249 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
251 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
252 const INT_ID &int_id,
253 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
255 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
256 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
258 int const result = this->insert_i (ext_id, int_id, entry);
262 entry->key () = ext_id;
263 entry->item () = int_id;
269 // Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
270 // then behaves just like <bind>. Otherwise, store the old value of
271 // <int_id> into the "out" parameter and rebind the new parameters.
272 // Returns 0 if a new entry is bound successfully, returns 1 if an
273 // existing entry was rebound, and returns -1 if failures occur.
275 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
277 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
278 const INT_ID &int_id,
281 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id)");
282 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
284 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
285 int result = this->insert_i (ext_id, int_id, entry);
289 old_int_id = entry->item ();
290 entry->key () = ext_id;
291 entry->item () = int_id;
298 // Same as a normal rebind, except the tree entry is also passed back
299 // to the caller. The entry in this case will either be the newly
300 // created entry, or the existing one.
302 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
304 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
305 const INT_ID &int_id,
307 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
309 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id,INT_ID &old_int_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
310 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
312 int result = this->insert_i (ext_id, int_id, entry);
316 old_int_id = entry->item ();
317 entry->key () = ext_id;
318 entry->item () = int_id;
325 // Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
326 // then behaves just like <bind>. Otherwise, store the old values
327 // of <ext_id> and <int_id> into the "out" parameters and rebind the
328 // new parameters. This is very useful if you need to have an
329 // atomic way of updating <ACE_RB_Tree_Nodes> and you also need
330 // full control over memory allocation. Returns 0 if a new entry is
331 // bound successfully, returns 1 if an existing entry was rebound,
332 // and returns -1 if failures occur.
334 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
336 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
337 const INT_ID &int_id,
341 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id,EXT_ID &old_ext_id, INT_ID &old_int_id)");
342 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
344 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
345 int result = this->insert_i (ext_id, int_id, entry);
349 old_ext_id = entry->key ();
350 old_int_id = entry->item ();
351 entry->key () = ext_id;
352 entry->item () = int_id;
359 // Same as a normal rebind, except the tree entry is also passed back
360 // to the caller. The entry in this case will either be the newly
361 // created entry, or the existing one.
363 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
365 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
366 const INT_ID &int_id,
369 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
371 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, EXT_ID &old_ext_id, INT_ID &old_int_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
372 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
374 int result = this->insert_i (ext_id, int_id, entry);
378 old_ext_id = entry->key ();
379 old_int_id = entry->item ();
380 entry->key () = ext_id;
381 entry->item () = int_id;
388 // Locate <ext_id> and pass out parameter via <int_id>. If found,
389 // return 0, returns -1 if not found.
391 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
393 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
396 ACE_TRACE ("ACE_RB_Tree::find (const EXT_ID &ext_id, INT_ID &int_id)");
397 ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
399 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry = 0;
401 int result = this->find_i (ext_id, entry);
404 int_id = entry->item ();
410 // Locate <ext_id> and pass out parameter via <entry>. If found,
411 // return 0, returns -1 if not found.
413 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
415 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
416 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
418 ACE_TRACE ("ACE_RB_Tree::find (const EXT_ID &ext_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
419 ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
421 return this->find_i (ext_id, entry);
425 // Unbind (remove) the <ext_id> from the tree. Don't return the
426 // <int_id> to the caller (this is useful for collections where the
427 // <int_id>s are *not* dynamically allocated...).
429 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
431 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)
433 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)");
434 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
437 int result = this->remove_i (ext_id, int_id);
439 // Remap the return codes from the internal method: this
440 // is maintained this way in support of deprecated methods,
441 // and will be cleaned up when these methods are removed.
445 // If the node was found and deleted, return success.
448 // If nothing was found, set errno and break.
452 // If an error happened, just break.
456 // Return an error if we didn't already return success.
461 // Break any association of <ext_id>. Returns the value of <int_id>
462 // in case the caller needs to deallocate memory.
464 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
466 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id,
469 ACE_TRACE ("ACE_RB_Tree::unbind (const EXT_ID &ext_id, INT_ID &int_id)");
470 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
472 int result = this->remove_i (ext_id, int_id);
474 // Remap the return codes from the internal method: this
475 // is maintained this way in support of deprecated methods,
476 // and will be cleaned up when these methods are removed.
480 // If the node was found and deleted, return success.
483 // If nothing was found, set errno and break.
487 // If an error happened, just break.
491 // Return an error if we didn't already return success.
496 // Remove entry from the tree. This method should be used with *extreme*
497 // caution, and only for optimization purposes. The node being passed
498 // in had better have been allocated by the tree that is unbinding it.
499 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
501 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry)
503 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry)");
504 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
506 return this->remove_i (entry);
510 // Returns a reference to the underlying <ACE_LOCK>. This makes it
511 // possible to acquire the lock explicitly, which can be useful in
512 // some cases if you instantiate the <ACE_Atomic_Op> with an
513 // <ACE_Recursive_Mutex> or <ACE_Process_Mutex>, or if you need to
514 // guard the state of an iterator. NOTE: the right name would be
515 // <lock>, but HP/C++ will choke on that!
517 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
518 ACE_INLINE ACE_LOCK &
519 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex ()
521 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex");
526 // Dump the state of an object.
528 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
530 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump () const
532 #if defined (ACE_HAS_DUMP)
533 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
534 ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
535 ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncurrent_size_ = %d\n"), this->current_size_));
536 this->allocator_->dump ();
538 ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nDumping nodes from root\n")));
539 this->dump_i (this->root_);
540 ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
541 #endif /* ACE_HAS_DUMP */
545 // Return forward iterator positioned at first node in tree.
547 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
548 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
549 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin ()
551 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin");
553 return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
557 // Return forward iterator positioned at last node in tree.
559 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
560 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
561 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end ()
563 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end");
565 return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
569 // Return reverse iterator positioned at last node in tree.
571 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
572 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
573 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin ()
575 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin");
577 return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
581 // Return reverse iterator positioned at first node in tree.
583 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
584 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
585 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend ()
587 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend");
589 return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
593 // Returns a pointer to the item corresponding to the given key,
594 // or 0 if it cannot find the key in the tree. DEPRECATED.
596 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
598 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &k)
600 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &k)");
602 // The reinterpret cast is to ensure that when this deprecated
603 // method is removed, and is replaced (as planned) by a find method
604 // that takes the same argument signature but returns an int, that
605 // the compiler will cough if this return macro is not changed to
606 // just return an int (whose value will be -1). Please leave this
608 ACE_READ_GUARD_RETURN (ACE_LOCK,
611 reinterpret_cast<INT_ID*> (0L));
613 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry = 0;
614 int result = this->find_i (k, entry);
615 return (result == 0) ? &(entry->item ()) : 0;
618 // Inserts a *copy* of the key and the item into the tree:
619 // both the key type EXT_ID and the item type INT_ID must have well
620 // defined semantics for copy construction and < comparison.
621 // This method returns a pointer to the inserted item copy,
622 // or 0 if an error occurred. NOTE: if an identical key
623 // already exists in the tree, no new item is created, and
624 // the returned pointer addresses the existing item
625 // associated with the existing key. DEPRECATED.
627 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
629 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert (const EXT_ID &k, const INT_ID &t)
631 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert");
632 ACE_WRITE_GUARD_RETURN (ACE_LOCK,
635 reinterpret_cast<INT_ID*> (0L));
637 return this->insert_i (k, t);
641 // Removes the item associated with the given key from the
642 // tree and destroys it. Returns 1 if it found the item
643 // and successfully destroyed it, 0 if it did not find the
644 // item, or -1 if an error occurred. DEPRECATED.
646 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
648 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove (const EXT_ID &k)
650 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove");
651 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
654 return this->remove_i (k, i);
658 // Destroys all nodes and sets the root pointer null. DEPRECATED
660 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
662 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::clear ()
664 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::clear");
665 ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_);
670 // Returns the current number of nodes in the tree.
672 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
674 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size () const
676 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size");
677 return current_size_;
681 ///////////////////////////////////////////////////////////////////////
683 // ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
684 ///////////////////////////////////////////////////////////////////////
686 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
688 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base ()
689 : tree_ (0), node_ (0)
691 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base ()");
694 // Returns 1 when the iteration has completed, otherwise 0.
696 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
698 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done () const
700 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done");
702 return node_ ? 0 : 1;
706 // STL-like iterator dereference operator: returns a reference
707 // to the node underneath the iterator.
709 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
710 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> &
711 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator* () const
713 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator*");
714 return *(this->node_);
718 // STL-like iterator dereference operator: returns a reference
719 // to the node underneath the iterator.
721 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
722 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
723 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-> () const
725 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator->");
730 // Returns a reference to the tree over which we're iterating.
732 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>ACE_INLINE const ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
733 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree ()
735 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree");
740 // Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
742 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
744 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==
745 (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
747 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==");
748 return (this->node_ == rbt.node_) ? true : false;
752 // Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
754 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
756 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=
757 (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
759 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=");
760 return (this->node_ == rbt.node_) ? false : true;
764 // Move forward by one element in the tree. Returns 0 when
765 // there are no more elements in the tree, otherwise 1.
767 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
769 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i ()
771 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i");
775 node_ = tree_->RB_tree_successor (node_);
778 return node_ ? 1 : 0;
782 // Move back by one element in the tree. Returns 0 when
783 // there are no more elements in the tree, otherwise 1.
785 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
787 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i ()
789 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i");
793 node_ = tree_->RB_tree_predecessor (node_);
796 return node_ ? 1 : 0;
800 //////////////////////////////////////////////////////////////////
802 // ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
803 //////////////////////////////////////////////////////////////////
805 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
807 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator ()
808 : ACE_RB_Tree_Iterator_Base<EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK> ()
810 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator ()");
813 // Move forward by one element in the tree. Returns
814 // 0 when all elements have been seen, else 1.
816 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
818 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance ()
820 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance");
822 return this->forward_i ();
826 // Dump the state of an object.
828 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
830 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump () const
832 #if defined (ACE_HAS_DUMP)
833 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
836 #endif /* ACE_HAS_DUMP */
842 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
843 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
844 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ ()
846 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ ()");
855 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
856 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
857 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
859 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (int)");
861 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
869 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
870 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
871 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- ()
873 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- ()");
882 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
883 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
884 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
886 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (int)");
888 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
894 // Passes back the <entry> under the iterator. Returns 0 if
895 // the iteration has completed, otherwise 1. This method must
896 // be declared and defined in both the derived forward and
897 // reverse iterator classes rather than in the base iterator
898 // class because of a method signature resolution problem
899 // caused by the existence of the deprecated next ()
900 // method in the derived forward iterator class. When that
901 // deprecated method is removed, this method should be removed
902 // from the derived classes and placed in the base class.
904 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
906 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next (ACE_RB_Tree_Node<EXT_ID, INT_ID> *&next_entry) const
908 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
912 next_entry = this->node_;
920 // Accessor for key of node under iterator (if any). DEPRECATED.
922 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
924 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key ()
926 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key");
927 return this->node_ ? (&(this->node_->key ())) : 0;
931 // Accessor for item of node under iterator (if any). DEPRECATED.
933 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
935 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item ()
937 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item");
938 return this->node_ ? (&(this->node_->item ())) : 0;
942 // Move to the first item in the tree. DEPRECATED.
944 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
946 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first ()
948 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first");
949 this->node_ = this->tree_->RB_tree_minimum (this->tree_->root_);
950 return this->node_ ? 1 : 0;
954 // Move to the last item in the tree. DEPRECATED.
956 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
958 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last ()
960 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last");
961 this->node_ = this->tree_->RB_tree_maximum (this->tree_->root_);
962 return this->node_ ? 1 : 0;
966 // Moves to the next item in the tree,
967 // returns 1 if there is a next item, 0 otherwise. DEPRECATED.
969 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
971 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next ()
973 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
974 this->node_ = this->tree_->RB_tree_successor (this->node_);
975 return this->node_ ? 1 : 0;
979 // Moves to the previous item in the tree,
980 // returns 1 if there is a previous item, 0 otherwise. DEPRECATED.
982 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
984 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous ()
986 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous");
987 this->node_ = this->tree_->RB_tree_predecessor (this->node_);
988 return this->node_ ? 1 : 0;
992 // Returns 0 if the iterator is positioned over a valid ACE_RB_Tree
993 // node, returns 1 if not. DEPRECATED.
995 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
997 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done ()
999 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done");
1000 return this->node_ ? 0 : 1;
1004 //////////////////////////////////////////////////////////////////////////
1005 // template class //
1006 // ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
1007 //////////////////////////////////////////////////////////////////////////
1010 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1012 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator ()
1013 : ACE_RB_Tree_Iterator_Base<EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK> ()
1015 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator ()");
1018 // Move forward by one element in the tree. Returns
1019 // 0 when all elements have been seen, else 1.
1021 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1023 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance ()
1025 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance");
1027 return this->reverse_i ();
1031 // Dump the state of an object.
1033 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1035 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump () const
1037 #if defined (ACE_HAS_DUMP)
1038 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
1041 #endif /* ACE_HAS_DUMP */
1047 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1048 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
1049 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ ()
1051 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ ()");
1060 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1061 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
1062 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
1064 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)");
1066 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
1074 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1075 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
1076 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- ()
1078 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- ()");
1087 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1088 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
1089 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
1091 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)");
1093 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
1099 // Passes back the <entry> under the iterator. Returns 0 if
1100 // the iteration has completed, otherwise 1. This method must
1101 // be declared and defined in both the derived forward and
1102 // reverse iterator classes rather than in the base iterator
1103 // class because of a method signature resolution problem
1104 // caused by the existence of the deprecated next ()
1105 // method in the derived forward iterator class. When that
1106 // deprecated method is removed, this method should be removed
1107 // from the derived classes and placed in the base class.
1109 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1111 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
1113 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
1117 next_entry = this->node_;
1124 ACE_END_VERSIONED_NAMESPACE_DECL