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 /////////////////////////////////////////////////////
14 template <class EXT_ID, class INT_ID>
16 ACE_RB_Tree_Node<EXT_ID, INT_ID>::key ()
18 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::key");
25 template <class EXT_ID, class INT_ID>
27 ACE_RB_Tree_Node<EXT_ID, INT_ID>::item ()
29 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>:item");
34 // Set color of the node.
36 template <class EXT_ID, class INT_ID>
38 ACE_RB_Tree_Node<EXT_ID, INT_ID>::color (ACE_RB_Tree_Node_Base::RB_Tree_Node_Color c)
40 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::color mutator");
45 // Get color of the node.
47 template <class EXT_ID, class INT_ID>
48 ACE_INLINE ACE_RB_Tree_Node_Base::RB_Tree_Node_Color
49 ACE_RB_Tree_Node<EXT_ID, INT_ID>::color ()
51 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::color accessor");
56 // Accessor for node's parent pointer.
58 template <class EXT_ID, class INT_ID>
59 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
60 ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent ()
62 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent accessor");
67 // Mutator for node's parent pointer.
69 template <class EXT_ID, class INT_ID>
71 ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent (ACE_RB_Tree_Node<EXT_ID, INT_ID> * p)
73 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent mutator");
79 // Accessor for node's left child pointer.
81 template <class EXT_ID, class INT_ID>
82 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
83 ACE_RB_Tree_Node<EXT_ID, INT_ID>::left ()
85 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::left accessor");
90 // Mutator for node's left child pointer.
92 template <class EXT_ID, class INT_ID>
94 ACE_RB_Tree_Node<EXT_ID, INT_ID>::left (ACE_RB_Tree_Node<EXT_ID, INT_ID> * l)
96 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::left mutator");
101 // Accessor for node's right child pointer.
103 template <class EXT_ID, class INT_ID>
104 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
105 ACE_RB_Tree_Node<EXT_ID, INT_ID>::right ()
107 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::right accessor");
112 // Mutator for node's right child pointer.
114 template <class EXT_ID, class INT_ID>
116 ACE_RB_Tree_Node<EXT_ID, INT_ID>::right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * r)
118 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::right mutator");
123 ////////////////////////////////////////////////////////////////////////
124 // template class ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
125 ////////////////////////////////////////////////////////////////////////
128 // Initialize an RB Tree.
130 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
132 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::open (ACE_Allocator *alloc)
134 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::open");
135 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
137 // Calling this->close_i () ensures we release previously allocated
138 // memory before allocating new memory.
141 // If we were passed an allocator use it,
142 // otherwise use the default instance.
145 alloc = ACE_Allocator::instance ();
147 this->allocator_ = alloc;
152 // Close down an RB_Tree and release dynamically allocated
155 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
157 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close (void)
159 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close");
160 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
162 return this->close_i ();
166 // Associate <ext_id> with <int_id>. If <ext_id> is already in the
167 // tree then the <ACE_RB_Tree_Node> is not changed. Returns 0 if a
168 // new entry is bound successfully, returns 1 if an attempt is made
169 // to bind an existing entry, and returns -1 if failures occur.
171 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
173 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
174 const INT_ID &int_id)
176 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &item, const INT_ID &int_id)");
177 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
179 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
180 return this->insert_i (ext_id, int_id, entry);
184 // Same as a normal bind, except the tree entry is also passed back
185 // to the caller. The entry in this case will either be the newly
186 // created entry, or the existing one.
188 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
190 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
191 const INT_ID &int_id,
192 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
194 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)");
195 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
197 return this->insert_i (ext_id, int_id, entry);
201 // Associate <ext_id> with <int_id> if and only if <ext_id> is not
202 // in the tree. If <ext_id> is already in the tree then the <int_id>
203 // parameter is assigned the existing value in the tree. Returns 0
204 // if a new entry is bound successfully, returns 1 if an attempt is
205 // made to bind an existing entry, and returns -1 if failures occur.
207 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
209 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
212 ACE_TRACE ("ACE_RB_Tree::trybind (const EXT_ID &ext_id, INT_ID &int_id)");
213 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
215 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
216 int result = this->insert_i (ext_id, int_id, entry);
220 int_id = entry->item ();
227 // Same as a normal trybind, except the tree entry is also passed
228 // back to the caller. The entry in this case will either be the
229 // newly created entry, or the existing one.
231 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
233 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
235 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
237 ACE_TRACE ("ACE_RB_Tree::trybind (const EXT_ID &ext_id, INT_ID &int_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
238 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
240 int result = this->insert_i (ext_id, int_id, entry);
244 int_id = entry->item ();
252 // Reassociate <ext_id> with <int_id>. If <ext_id> is not in the
253 // tree then behaves just like <bind>. Returns 0 if a new entry is
254 // bound successfully, returns 1 if an existing entry was rebound,
255 // and returns -1 if failures occur.
257 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
259 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
260 const INT_ID &int_id)
262 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id)");
263 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
265 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
266 int result = this->insert_i (ext_id, int_id, entry);
270 entry->key () = ext_id;
271 entry->item () = int_id;
278 // Same as a normal rebind, except the tree entry is also passed back
279 // to the caller. The entry in this case will either be the newly
280 // created entry, or the existing one.
282 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
284 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
285 const INT_ID &int_id,
286 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
288 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)");
289 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
291 int result = this->insert_i (ext_id, int_id, entry);
295 entry->key () = ext_id;
296 entry->item () = int_id;
303 // Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
304 // then behaves just like <bind>. Otherwise, store the old value of
305 // <int_id> into the "out" parameter and rebind the new parameters.
306 // Returns 0 if a new entry is bound successfully, returns 1 if an
307 // existing entry was rebound, and returns -1 if failures occur.
309 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
311 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
312 const INT_ID &int_id,
315 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id)");
316 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
318 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
319 int result = this->insert_i (ext_id, int_id, entry);
323 old_int_id = entry->item ();
324 entry->key () = ext_id;
325 entry->item () = int_id;
332 // Same as a normal rebind, except the tree entry is also passed back
333 // to the caller. The entry in this case will either be the newly
334 // created entry, or the existing one.
336 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
338 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
339 const INT_ID &int_id,
341 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
343 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)");
344 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
346 int result = this->insert_i (ext_id, int_id, entry);
350 old_int_id = entry->item ();
351 entry->key () = ext_id;
352 entry->item () = int_id;
359 // Associate <ext_id> with <int_id>. If <ext_id> is not in the tree
360 // then behaves just like <bind>. Otherwise, store the old values
361 // of <ext_id> and <int_id> into the "out" parameters and rebind the
362 // new parameters. This is very useful if you need to have an
363 // atomic way of updating <ACE_RB_Tree_Nodes> and you also need
364 // full control over memory allocation. Returns 0 if a new entry is
365 // bound successfully, returns 1 if an existing entry was rebound,
366 // and returns -1 if failures occur.
368 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
370 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
371 const INT_ID &int_id,
375 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)");
376 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
378 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
379 int result = this->insert_i (ext_id, int_id, entry);
383 old_ext_id = entry->key ();
384 old_int_id = entry->item ();
385 entry->key () = ext_id;
386 entry->item () = int_id;
393 // Same as a normal rebind, except the tree entry is also passed back
394 // to the caller. The entry in this case will either be the newly
395 // created entry, or the existing one.
397 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
399 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
400 const INT_ID &int_id,
403 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
405 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)");
406 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
408 int result = this->insert_i (ext_id, int_id, entry);
412 old_ext_id = entry->key ();
413 old_int_id = entry->item ();
414 entry->key () = ext_id;
415 entry->item () = int_id;
422 // Locate <ext_id> and pass out parameter via <int_id>. If found,
423 // return 0, returns -1 if not found.
425 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
427 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
430 ACE_TRACE ("ACE_RB_Tree::find (const EXT_ID &ext_id, INT_ID &int_id)");
431 ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
433 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry = 0;
435 int result = this->find_i (ext_id, entry);
438 int_id = entry->item ();
444 // Locate <ext_id> and pass out parameter via <entry>. If found,
445 // return 0, returns -1 if not found.
447 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
449 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
450 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
452 ACE_TRACE ("ACE_RB_Tree::find (const EXT_ID &ext_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
453 ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
455 return this->find_i (ext_id, entry);
459 // Unbind (remove) the <ext_id> from the tree. Don't return the
460 // <int_id> to the caller (this is useful for collections where the
461 // <int_id>s are *not* dynamically allocated...).
463 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
465 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)
467 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)");
468 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
471 int result = this->remove_i (ext_id, int_id);
473 // Remap the return codes from the internal method: this
474 // is maintained this way in support of deprecated methods,
475 // and will be cleaned up when these methods are removed.
479 // If the node was found and deleted, return success.
482 // If nothing was found, set errno and break.
486 // If an error happened, just break.
490 // Return an error if we didn't already return success.
495 // Break any association of <ext_id>. Returns the value of <int_id>
496 // in case the caller needs to deallocate memory.
498 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
500 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id,
503 ACE_TRACE ("ACE_RB_Tree::unbind (const EXT_ID &ext_id, INT_ID &int_id)");
504 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
506 int result = this->remove_i (ext_id, int_id);
508 // Remap the return codes from the internal method: this
509 // is maintained this way in support of deprecated methods,
510 // and will be cleaned up when these methods are removed.
514 // If the node was found and deleted, return success.
517 // If nothing was found, set errno and break.
521 // If an error happened, just break.
525 // Return an error if we didn't already return success.
530 // Remove entry from the tree. This method should be used with *extreme*
531 // caution, and only for optimization purposes. The node being passed
532 // in had better have been allocated by the tree that is unbinding it.
533 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
535 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry)
537 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry)");
538 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
540 return this->remove_i (entry);
544 // Returns a reference to the underlying <ACE_LOCK>. This makes it
545 // possible to acquire the lock explicitly, which can be useful in
546 // some cases if you instantiate the <ACE_Atomic_Op> with an
547 // <ACE_Recursive_Mutex> or <ACE_Process_Mutex>, or if you need to
548 // guard the state of an iterator. NOTE: the right name would be
549 // <lock>, but HP/C++ will choke on that!
551 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
552 ACE_INLINE ACE_LOCK &
553 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex (void)
555 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex");
560 // Dump the state of an object.
562 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
564 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
566 #if defined (ACE_HAS_DUMP)
567 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
568 ACELIB_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
569 ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\ncurrent_size_ = %d\n"), this->current_size_));
570 this->allocator_->dump ();
572 ACELIB_DEBUG ((LM_DEBUG, ACE_TEXT ("\nDumping nodes from root\n")));
573 this->dump_i (this->root_);
574 ACELIB_DEBUG ((LM_DEBUG, ACE_END_DUMP));
575 #endif /* ACE_HAS_DUMP */
579 // Return forward iterator positioned at first node in tree.
581 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
582 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
583 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin (void)
585 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin");
587 return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
591 // Return forward iterator positioned at last node in tree.
593 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
594 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
595 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end (void)
597 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end");
599 return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
603 // Return reverse iterator positioned at last node in tree.
605 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
606 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
607 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin (void)
609 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin");
611 return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
615 // Return reverse iterator positioned at first node in tree.
617 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
618 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
619 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend (void)
621 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend");
623 return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
627 // Returns a pointer to the item corresponding to the given key,
628 // or 0 if it cannot find the key in the tree. DEPRECATED.
630 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
632 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &k)
634 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &k)");
636 // The reinterpret cast is to ensure that when this deprecated
637 // method is removed, and is replaced (as planned) by a find method
638 // that takes the same argument signature but returns an int, that
639 // the compiler will cough if this return macro is not changed to
640 // just return an int (whose value will be -1). Please leave this
642 ACE_READ_GUARD_RETURN (ACE_LOCK,
645 reinterpret_cast<INT_ID*> (0L));
647 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry = 0;
648 int result = this->find_i (k, entry);
649 return (result == 0) ? &(entry->item ()) : 0;
652 // Inserts a *copy* of the key and the item into the tree:
653 // both the key type EXT_ID and the item type INT_ID must have well
654 // defined semantics for copy construction and < comparison.
655 // This method returns a pointer to the inserted item copy,
656 // or 0 if an error occurred. NOTE: if an identical key
657 // already exists in the tree, no new item is created, and
658 // the returned pointer addresses the existing item
659 // associated with the existing key. DEPRECATED.
661 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
663 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert (const EXT_ID &k, const INT_ID &t)
665 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert");
666 ACE_WRITE_GUARD_RETURN (ACE_LOCK,
669 reinterpret_cast<INT_ID*> (0L));
671 return this->insert_i (k, t);
675 // Removes the item associated with the given key from the
676 // tree and destroys it. Returns 1 if it found the item
677 // and successfully destroyed it, 0 if it did not find the
678 // item, or -1 if an error occurred. DEPRECATED.
680 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
682 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove (const EXT_ID &k)
684 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove");
685 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
688 return this->remove_i (k, i);
692 // Destroys all nodes and sets the root pointer null. DEPRECATED
694 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
696 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::clear ()
698 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::clear");
699 ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_);
704 // Returns the current number of nodes in the tree.
706 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
708 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size () const
710 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size");
711 return current_size_;
715 ///////////////////////////////////////////////////////////////////////
717 // ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
718 ///////////////////////////////////////////////////////////////////////
720 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
722 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (void)
723 : tree_ (0), node_ (0)
725 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (void)");
728 // Returns 1 when the iteration has completed, otherwise 0.
730 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
732 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done (void) const
734 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done");
736 return node_ ? 0 : 1;
740 // STL-like iterator dereference operator: returns a reference
741 // to the node underneath the iterator.
743 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
744 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> &
745 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator* (void) const
747 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator*");
748 return *(this->node_);
752 // STL-like iterator dereference operator: returns a reference
753 // to the node underneath the iterator.
755 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
756 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
757 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-> (void) const
759 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator->");
764 // Returns a reference to the tree over which we're iterating.
766 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> &
767 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree (void)
769 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree");
774 // Comparison operator: returns 1 if both iterators point to the same position, otherwise 0.
776 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
778 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==
779 (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
781 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==");
782 return (this->node_ == rbt.node_) ? true : false;
786 // Comparison operator: returns 1 if the iterators point to different positions, otherwise 0.
788 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
790 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=
791 (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
793 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=");
794 return (this->node_ == rbt.node_) ? false : true;
798 // Move forward by one element in the tree. Returns 0 when
799 // there are no more elements in the tree, otherwise 1.
801 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
803 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i (void)
805 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i");
809 node_ = tree_->RB_tree_successor (node_);
812 return node_ ? 1 : 0;
816 // Move back by one element in the tree. Returns 0 when
817 // there are no more elements in the tree, otherwise 1.
819 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
821 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i (void)
823 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i");
827 node_ = tree_->RB_tree_predecessor (node_);
830 return node_ ? 1 : 0;
834 //////////////////////////////////////////////////////////////////
836 // ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
837 //////////////////////////////////////////////////////////////////
839 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
841 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator (void)
842 : ACE_RB_Tree_Iterator_Base<EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK> ()
844 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator (void)");
847 // Move forward by one element in the tree. Returns
848 // 0 when all elements have been seen, else 1.
850 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
852 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance (void)
854 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance");
856 return this->forward_i ();
860 // Dump the state of an object.
862 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
864 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
866 #if defined (ACE_HAS_DUMP)
867 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
870 #endif /* ACE_HAS_DUMP */
876 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
877 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
878 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
880 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (void)");
889 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
890 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
891 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
893 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (int)");
895 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
903 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
904 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
905 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
907 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (void)");
916 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
917 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
918 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
920 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (int)");
922 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
928 // Passes back the <entry> under the iterator. Returns 0 if
929 // the iteration has completed, otherwise 1. This method must
930 // be declared and defined in both the derived forward and
931 // reverse iterator classes rather than in the base iterator
932 // class because of a method signature resolution problem
933 // caused by the existence of the deprecated next (void)
934 // method in the derived forward iterator class. When that
935 // deprecated method is removed, this method should be removed
936 // from the derived classes and placed in the base class.
938 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
940 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next (ACE_RB_Tree_Node<EXT_ID, INT_ID> *&next_entry) const
942 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
946 next_entry = this->node_;
954 // Accessor for key of node under iterator (if any). 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>::key ()
960 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key");
961 return this->node_ ? (&(this->node_->key ())) : 0;
965 // Accessor for item of node under iterator (if any). DEPRECATED.
967 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
969 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item ()
971 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item");
972 return this->node_ ? (&(this->node_->item ())) : 0;
976 // Move to the first item in the tree. DEPRECATED.
978 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
980 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first ()
982 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first");
983 this->node_ = this->tree_->RB_tree_minimum (this->tree_->root_);
984 return this->node_ ? 1 : 0;
988 // Move to the last item in the tree. DEPRECATED.
990 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
992 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last ()
994 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last");
995 this->node_ = this->tree_->RB_tree_maximum (this->tree_->root_);
996 return this->node_ ? 1 : 0;
1000 // Moves to the next item in the tree,
1001 // returns 1 if there is a next item, 0 otherwise. DEPRECATED.
1003 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1005 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next ()
1007 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
1008 this->node_ = this->tree_->RB_tree_successor (this->node_);
1009 return this->node_ ? 1 : 0;
1013 // Moves to the previous item in the tree,
1014 // returns 1 if there is a previous item, 0 otherwise. DEPRECATED.
1016 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1018 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous ()
1020 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous");
1021 this->node_ = this->tree_->RB_tree_predecessor (this->node_);
1022 return this->node_ ? 1 : 0;
1026 // Returns 0 if the iterator is positioned over a valid ACE_RB_Tree
1027 // node, returns 1 if not. DEPRECATED.
1029 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1031 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done ()
1033 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done");
1034 return this->node_ ? 0 : 1;
1038 //////////////////////////////////////////////////////////////////////////
1039 // template class //
1040 // ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> //
1041 //////////////////////////////////////////////////////////////////////////
1044 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1046 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator (void)
1047 : ACE_RB_Tree_Iterator_Base<EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK> ()
1049 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator (void)");
1052 // Move forward by one element in the tree. Returns
1053 // 0 when all elements have been seen, else 1.
1055 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1057 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance (void)
1059 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance");
1061 return this->reverse_i ();
1065 // Dump the state of an object.
1067 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1069 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
1071 #if defined (ACE_HAS_DUMP)
1072 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
1075 #endif /* ACE_HAS_DUMP */
1081 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1082 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
1083 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
1085 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)");
1094 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1095 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
1096 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
1098 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)");
1100 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
1108 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1109 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
1110 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
1112 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)");
1121 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1122 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
1123 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
1125 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)");
1127 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
1133 // Passes back the <entry> under the iterator. Returns 0 if
1134 // the iteration has completed, otherwise 1. This method must
1135 // be declared and defined in both the derived forward and
1136 // reverse iterator classes rather than in the base iterator
1137 // class because of a method signature resolution problem
1138 // caused by the existence of the deprecated next (void)
1139 // method in the derived forward iterator class. When that
1140 // deprecated method is removed, this method should be removed
1141 // from the derived classes and placed in the base class.
1143 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
1145 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
1147 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
1151 next_entry = this->node_;
1158 ACE_END_VERSIONED_NAMESPACE_DECL