00001
00002
00003
00004
00005 #include "ace/Guard_T.h"
00006 #include "ace/Malloc_Base.h"
00007 #include "ace/Log_Msg.h"
00008
00009 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00010
00011
00012
00013
00014
00015
00016
00017 template <class EXT_ID, class INT_ID>
00018 ACE_INLINE EXT_ID &
00019 ACE_RB_Tree_Node<EXT_ID, INT_ID>::key ()
00020 {
00021 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::key");
00022 return k_;
00023 }
00024
00025
00026
00027
00028 template <class EXT_ID, class INT_ID>
00029 ACE_INLINE INT_ID &
00030 ACE_RB_Tree_Node<EXT_ID, INT_ID>::item ()
00031 {
00032 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>:item");
00033 return t_;
00034 }
00035
00036
00037
00038
00039 template <class EXT_ID, class INT_ID>
00040 ACE_INLINE void
00041 ACE_RB_Tree_Node<EXT_ID, INT_ID>::color (ACE_RB_Tree_Node_Base::RB_Tree_Node_Color c)
00042 {
00043 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::color mutator");
00044 color_ = c;
00045 }
00046
00047
00048
00049
00050 template <class EXT_ID, class INT_ID>
00051 ACE_INLINE ACE_RB_Tree_Node_Base::RB_Tree_Node_Color
00052 ACE_RB_Tree_Node<EXT_ID, INT_ID>::color ()
00053 {
00054 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::color accessor");
00055 return color_;
00056 }
00057
00058
00059
00060
00061 template <class EXT_ID, class INT_ID>
00062 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
00063 ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent ()
00064 {
00065 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent accessor");
00066 return parent_;
00067 }
00068
00069
00070
00071
00072 template <class EXT_ID, class INT_ID>
00073 ACE_INLINE void
00074 ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent (ACE_RB_Tree_Node<EXT_ID, INT_ID> * p)
00075 {
00076 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::parent mutator");
00077 parent_ = p;
00078 }
00079
00080
00081
00082
00083
00084 template <class EXT_ID, class INT_ID>
00085 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
00086 ACE_RB_Tree_Node<EXT_ID, INT_ID>::left ()
00087 {
00088 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::left accessor");
00089 return left_;
00090 }
00091
00092
00093
00094
00095 template <class EXT_ID, class INT_ID>
00096 ACE_INLINE void
00097 ACE_RB_Tree_Node<EXT_ID, INT_ID>::left (ACE_RB_Tree_Node<EXT_ID, INT_ID> * l)
00098 {
00099 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::left mutator");
00100 left_ = l;
00101 }
00102
00103
00104
00105
00106 template <class EXT_ID, class INT_ID>
00107 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
00108 ACE_RB_Tree_Node<EXT_ID, INT_ID>::right ()
00109 {
00110 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::right accessor");
00111 return right_;
00112 }
00113
00114
00115
00116
00117 template <class EXT_ID, class INT_ID>
00118 ACE_INLINE void
00119 ACE_RB_Tree_Node<EXT_ID, INT_ID>::right (ACE_RB_Tree_Node<EXT_ID, INT_ID> * r)
00120 {
00121 ACE_TRACE ("ACE_RB_Tree_Node<EXT_ID, INT_ID>::right mutator");
00122 right_ = r;
00123 }
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00134 ACE_INLINE int
00135 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::open (ACE_Allocator *alloc)
00136 {
00137 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::open");
00138 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00139
00140
00141
00142 this->close_i ();
00143
00144
00145
00146
00147 if (alloc == 0)
00148 alloc = ACE_Allocator::instance ();
00149
00150 this->allocator_ = alloc;
00151
00152 return 0;
00153 }
00154
00155
00156
00157
00158 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00159 ACE_INLINE int
00160 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close (void)
00161 {
00162 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::close");
00163 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00164
00165 return this->close_i ();
00166 }
00167
00168
00169
00170
00171
00172
00173
00174 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00175 ACE_INLINE int
00176 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
00177 const INT_ID &int_id)
00178 {
00179 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &item, const INT_ID &int_id)");
00180 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00181
00182 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
00183 return this->insert_i (ext_id, int_id, entry);
00184 }
00185
00186
00187
00188
00189
00190
00191 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00192 ACE_INLINE int
00193 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::bind (const EXT_ID &ext_id,
00194 const INT_ID &int_id,
00195 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
00196 {
00197 ACE_TRACE ("ACE_RB_Tree::bind (const EXT_ID &ext_id, const INT_ID &int_id, "
00198 "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
00199 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00200
00201 return this->insert_i (ext_id, int_id, entry);
00202 }
00203
00204
00205
00206
00207
00208
00209
00210
00211 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00212 ACE_INLINE int
00213 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
00214 INT_ID &int_id)
00215 {
00216 ACE_TRACE ("ACE_RB_Tree::trybind (const EXT_ID &ext_id, INT_ID &int_id)");
00217 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00218
00219 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
00220 int result = this->insert_i (ext_id, int_id, entry);
00221
00222 if (result == 1)
00223 {
00224 int_id = entry->item ();
00225 }
00226
00227 return result;
00228 }
00229
00230
00231
00232
00233
00234
00235 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00236 ACE_INLINE int
00237 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::trybind (const EXT_ID &ext_id,
00238 INT_ID &int_id,
00239 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
00240 {
00241 ACE_TRACE ("ACE_RB_Tree::trybind (const EXT_ID &ext_id, INT_ID &int_id, "
00242 "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
00243 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00244
00245 int result = this->insert_i (ext_id, int_id, entry);
00246
00247 if (result == 1)
00248 {
00249 int_id = entry->item ();
00250 }
00251
00252
00253 return result;
00254 }
00255
00256
00257
00258
00259
00260
00261
00262 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00263 ACE_INLINE int
00264 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
00265 const INT_ID &int_id)
00266 {
00267 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id)");
00268 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00269
00270 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
00271 int result = this->insert_i (ext_id, int_id, entry);
00272
00273 if (result == 1)
00274 {
00275 entry->key () = ext_id;
00276 entry->item () = int_id;
00277 }
00278
00279 return result;
00280 }
00281
00282
00283
00284
00285
00286
00287 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00288 ACE_INLINE int
00289 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
00290 const INT_ID &int_id,
00291 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
00292 {
00293 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, "
00294 "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
00295 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00296
00297 int result = this->insert_i (ext_id, int_id, entry);
00298
00299 if (result == 1)
00300 {
00301 entry->key () = ext_id;
00302 entry->item () = int_id;
00303 }
00304
00305 return result;
00306 }
00307
00308
00309
00310
00311
00312
00313
00314
00315 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00316 ACE_INLINE int
00317 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
00318 const INT_ID &int_id,
00319 INT_ID &old_int_id)
00320 {
00321 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, "
00322 "const INT_ID &int_id, INT_ID &old_int_id)");
00323 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00324
00325 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
00326 int result = this->insert_i (ext_id, int_id, entry);
00327
00328 if (result == 1)
00329 {
00330 old_int_id = entry->item ();
00331 entry->key () = ext_id;
00332 entry->item () = int_id;
00333 }
00334
00335 return result;
00336 }
00337
00338
00339
00340
00341
00342
00343 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00344 ACE_INLINE int
00345 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
00346 const INT_ID &int_id,
00347 INT_ID &old_int_id,
00348 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
00349 {
00350 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id,"
00351 "INT_ID &old_int_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
00352 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00353
00354 int result = this->insert_i (ext_id, int_id, entry);
00355
00356 if (result == 1)
00357 {
00358 old_int_id = entry->item ();
00359 entry->key () = ext_id;
00360 entry->item () = int_id;
00361 }
00362
00363 return result;
00364 }
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00377 ACE_INLINE int
00378 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
00379 const INT_ID &int_id,
00380 EXT_ID &old_ext_id,
00381 INT_ID &old_int_id)
00382 {
00383 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id,"
00384 "EXT_ID &old_ext_id, INT_ID &old_int_id)");
00385 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00386
00387 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry;
00388 int result = this->insert_i (ext_id, int_id, entry);
00389
00390 if (result == 1)
00391 {
00392 old_ext_id = entry->key ();
00393 old_int_id = entry->item ();
00394 entry->key () = ext_id;
00395 entry->item () = int_id;
00396 }
00397
00398 return result;
00399 }
00400
00401
00402
00403
00404
00405
00406 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00407 ACE_INLINE int
00408 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rebind (const EXT_ID &ext_id,
00409 const INT_ID &int_id,
00410 EXT_ID &old_ext_id,
00411 INT_ID &old_int_id,
00412 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
00413 {
00414 ACE_TRACE ("ACE_RB_Tree::rebind (const EXT_ID &ext_id, const INT_ID &int_id, "
00415 "EXT_ID &old_ext_id, INT_ID &old_int_id, "
00416 "ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
00417 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00418
00419 int result = this->insert_i (ext_id, int_id, entry);
00420
00421 if (result == 1)
00422 {
00423 old_ext_id = entry->key ();
00424 old_int_id = entry->item ();
00425 entry->key () = ext_id;
00426 entry->item () = int_id;
00427 }
00428
00429 return result;
00430 }
00431
00432
00433
00434
00435
00436 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00437 ACE_INLINE int
00438 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
00439 INT_ID &int_id)
00440 {
00441 ACE_TRACE ("ACE_RB_Tree::find (const EXT_ID &ext_id, INT_ID &int_id)");
00442 ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00443
00444 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry = 0;
00445
00446 int result = this->find_i (ext_id, entry);
00447 if (result == 0)
00448 {
00449 int_id = entry->item ();
00450 }
00451
00452 return result;
00453 }
00454
00455
00456
00457
00458 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00459 ACE_INLINE int
00460 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &ext_id,
00461 ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)
00462 {
00463 ACE_TRACE ("ACE_RB_Tree::find (const EXT_ID &ext_id, ACE_RB_Tree_Node<EXT_ID, INT_ID> *&entry)");
00464 ACE_READ_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00465
00466 return this->find_i (ext_id, entry);
00467 }
00468
00469
00470
00471
00472
00473
00474 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00475 ACE_INLINE int
00476 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)
00477 {
00478 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id)");
00479 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00480
00481 INT_ID int_id;
00482 int result = this->remove_i (ext_id, int_id);
00483
00484
00485
00486
00487 switch (result)
00488 {
00489 case 1:
00490
00491 return 0;
00492 case 0:
00493
00494 errno = ENOENT;
00495 break;
00496 case -1:
00497
00498 break;
00499 }
00500
00501
00502 return -1;
00503 }
00504
00505
00506
00507
00508
00509 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00510 ACE_INLINE int
00511 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (const EXT_ID &ext_id,
00512 INT_ID &int_id)
00513 {
00514 ACE_TRACE ("ACE_RB_Tree::unbind (const EXT_ID &ext_id, INT_ID &int_id)");
00515 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00516
00517 int result = this->remove_i (ext_id, int_id);
00518
00519
00520
00521
00522 switch (result)
00523 {
00524 case 1:
00525
00526 return 0;
00527 case 0:
00528
00529 errno = ENOENT;
00530 break;
00531 case -1:
00532
00533 break;
00534 }
00535
00536
00537 return -1;
00538 }
00539
00540
00541
00542
00543
00544 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00545 ACE_INLINE int
00546 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry)
00547 {
00548 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::unbind (ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry)");
00549 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00550
00551 return this->remove_i (entry);
00552 }
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00563 ACE_INLINE ACE_LOCK &
00564 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex (void)
00565 {
00566 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::mutex");
00567 return this->lock_;
00568 }
00569
00570
00571
00572
00573 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00574 ACE_INLINE void
00575 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
00576 {
00577 #if defined (ACE_HAS_DUMP)
00578 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
00579 ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00580 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\ncurrent_size_ = %d\n"), this->current_size_));
00581 this->allocator_->dump ();
00582 this->lock_.dump ();
00583 ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nDumping nodes from root\n")));
00584 this->dump_i (this->root_);
00585 ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00586 #endif
00587 }
00588
00589
00590
00591
00592 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00593 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
00594 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin (void)
00595 {
00596 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::begin");
00597
00598 return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
00599 }
00600
00601
00602
00603
00604 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00605 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
00606 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end (void)
00607 {
00608 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::end");
00609
00610 return ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
00611 }
00612
00613
00614
00615
00616 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00617 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
00618 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin (void)
00619 {
00620 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rbegin");
00621
00622 return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> (*this);
00623 }
00624
00625
00626
00627
00628 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00629 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
00630 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend (void)
00631 {
00632 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::rend");
00633
00634 return ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> ();
00635 }
00636
00637
00638
00639
00640
00641 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00642 ACE_INLINE INT_ID*
00643 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &k)
00644 {
00645 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::find (const EXT_ID &k)");
00646
00647
00648
00649
00650
00651
00652
00653 ACE_READ_GUARD_RETURN (ACE_LOCK,
00654 ace_mon,
00655 this->lock_,
00656 reinterpret_cast<INT_ID*> (0L));
00657
00658 ACE_RB_Tree_Node<EXT_ID, INT_ID> *entry = 0;
00659 int result = this->find_i (k, entry);
00660 return (result == 0) ? &(entry->item ()) : 0;
00661 }
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00673 ACE_INLINE INT_ID*
00674 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert (const EXT_ID &k, const INT_ID &t)
00675 {
00676 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::insert");
00677 ACE_WRITE_GUARD_RETURN (ACE_LOCK,
00678 ace_mon,
00679 this->lock_,
00680 reinterpret_cast<INT_ID*> (0L));
00681
00682 return this->insert_i (k, t);
00683 }
00684
00685
00686
00687
00688
00689
00690
00691 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00692 ACE_INLINE int
00693 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove (const EXT_ID &k)
00694 {
00695 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::remove");
00696 ACE_WRITE_GUARD_RETURN (ACE_LOCK, ace_mon, this->lock_, -1);
00697
00698 INT_ID i;
00699 return this->remove_i (k, i);
00700 }
00701
00702
00703
00704
00705 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00706 ACE_INLINE void
00707 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::clear ()
00708 {
00709 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::clear");
00710 ACE_WRITE_GUARD (ACE_LOCK, ace_mon, this->lock_);
00711
00712 this->close_i ();
00713 }
00714
00715
00716
00717 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00718 ACE_INLINE size_t
00719 ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size () const
00720 {
00721 ACE_TRACE ("ACE_RB_Tree<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::current_size");
00722 return current_size_;
00723 }
00724
00725
00726
00727
00728
00729
00730
00731 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00732 ACE_INLINE
00733 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (void)
00734 : tree_ (0), node_ (0)
00735 {
00736 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator_Base (void)");
00737 }
00738
00739
00740
00741 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00742 ACE_INLINE int
00743 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done (void) const
00744 {
00745 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::done");
00746
00747 return node_ ? 0 : 1;
00748 }
00749
00750
00751
00752
00753
00754 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00755 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> &
00756 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator* (void) const
00757 {
00758 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator*");
00759 return *(this->node_);
00760 }
00761
00762
00763
00764
00765
00766 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00767 ACE_INLINE ACE_RB_Tree_Node<EXT_ID, INT_ID> *
00768 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-> (void) const
00769 {
00770 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator->");
00771 return this->node_;
00772 }
00773
00774
00775
00776
00777 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> &
00778 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree (void)
00779 {
00780 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::tree");
00781 return *tree_;
00782 }
00783
00784
00785
00786
00787 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00788 ACE_INLINE bool
00789 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==
00790 (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
00791 {
00792 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator==");
00793 return (this->node_ == rbt.node_) ? true : false;
00794 }
00795
00796
00797
00798
00799 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00800 ACE_INLINE bool
00801 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=
00802 (const ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &rbt) const
00803 {
00804 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator!=");
00805 return (this->node_ == rbt.node_) ? false : true;
00806 }
00807
00808
00809
00810
00811
00812 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00813 ACE_INLINE int
00814 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i (void)
00815 {
00816 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::forward_i");
00817
00818 if (node_)
00819 {
00820 node_ = tree_->RB_tree_successor (node_);
00821 }
00822
00823 return node_ ? 1 : 0;
00824 }
00825
00826
00827
00828
00829
00830 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00831 ACE_INLINE int
00832 ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i (void)
00833 {
00834 ACE_TRACE ("ACE_RB_Tree_Iterator_Base<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::reverse_i");
00835
00836 if (node_)
00837 {
00838 node_ = tree_->RB_tree_predecessor (node_);
00839 }
00840
00841 return node_ ? 1 : 0;
00842 }
00843
00844
00845
00846
00847
00848
00849
00850 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00851 ACE_INLINE
00852 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator (void)
00853 : ACE_RB_Tree_Iterator_Base<EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK> ()
00854 {
00855 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Iterator (void)");
00856 }
00857
00858
00859
00860
00861 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00862 ACE_INLINE int
00863 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance (void)
00864 {
00865 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance");
00866
00867 return this->forward_i ();
00868 }
00869
00870
00871
00872
00873 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00874 ACE_INLINE void
00875 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
00876 {
00877 #if defined (ACE_HAS_DUMP)
00878 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
00879
00880 this->dump_i ();
00881 #endif
00882 }
00883
00884
00885
00886
00887 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00888 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
00889 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
00890 {
00891 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (void)");
00892
00893 this->forward_i ();
00894 return *this;
00895 }
00896
00897
00898
00899
00900 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00901 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
00902 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
00903 {
00904 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator++ (int)");
00905
00906 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
00907 ++*this;
00908 return retv;
00909 }
00910
00911
00912
00913
00914 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00915 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
00916 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
00917 {
00918 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (void)");
00919
00920 this->reverse_i ();
00921 return *this;
00922 }
00923
00924
00925
00926
00927 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00928 ACE_INLINE ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
00929 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
00930 {
00931 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> operator-- (int)");
00932
00933 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
00934 --*this;
00935 return retv;
00936 }
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948
00949 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00950 ACE_INLINE int
00951 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next (ACE_RB_Tree_Node<EXT_ID, INT_ID> *&next_entry) const
00952 {
00953 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
00954
00955 if (this->node_)
00956 {
00957 next_entry = this->node_;
00958 return 1;
00959 }
00960
00961 return 0;
00962 }
00963
00964
00965
00966
00967 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00968 ACE_INLINE EXT_ID *
00969 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key ()
00970 {
00971 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::key");
00972 return this->node_ ? (&(this->node_->key ())) : 0;
00973 }
00974
00975
00976
00977
00978 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00979 ACE_INLINE INT_ID *
00980 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item ()
00981 {
00982 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::item");
00983 return this->node_ ? (&(this->node_->item ())) : 0;
00984 }
00985
00986
00987
00988
00989 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
00990 ACE_INLINE int
00991 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first ()
00992 {
00993 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::first");
00994 this->node_ = this->tree_->RB_tree_minimum (this->tree_->root_);
00995 return this->node_ ? 1 : 0;
00996 }
00997
00998
00999
01000
01001 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01002 ACE_INLINE int
01003 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last ()
01004 {
01005 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::last");
01006 this->node_ = this->tree_->RB_tree_maximum (this->tree_->root_);
01007 return this->node_ ? 1 : 0;
01008 }
01009
01010
01011
01012
01013
01014 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01015 ACE_INLINE int
01016 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next ()
01017 {
01018 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
01019 this->node_ = this->tree_->RB_tree_successor (this->node_);
01020 return this->node_ ? 1 : 0;
01021 }
01022
01023
01024
01025
01026
01027 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01028 ACE_INLINE int
01029 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous ()
01030 {
01031 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::previous");
01032 this->node_ = this->tree_->RB_tree_predecessor (this->node_);
01033 return this->node_ ? 1 : 0;
01034 }
01035
01036
01037
01038
01039
01040 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01041 ACE_INLINE int
01042 ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done ()
01043 {
01044 ACE_TRACE ("ACE_RB_Tree_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::is_done");
01045 return this->node_ ? 0 : 1;
01046 }
01047
01048
01049
01050
01051
01052
01053
01054
01055 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01056 ACE_INLINE
01057 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator (void)
01058 : ACE_RB_Tree_Iterator_Base<EXT_ID,INT_ID,COMPARE_KEYS,ACE_LOCK> ()
01059 {
01060 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::ACE_RB_Tree_Reverse_Iterator (void)");
01061 }
01062
01063
01064
01065
01066 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01067 ACE_INLINE int
01068 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance (void)
01069 {
01070 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::advance");
01071
01072 return this->reverse_i ();
01073 }
01074
01075
01076
01077
01078 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01079 ACE_INLINE void
01080 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump (void) const
01081 {
01082 #if defined (ACE_HAS_DUMP)
01083 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::dump");
01084
01085 this->dump_i ();
01086 #endif
01087 }
01088
01089
01090
01091
01092 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01093 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
01094 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)
01095 {
01096 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (void)");
01097
01098 this->reverse_i ();
01099 return *this;
01100 }
01101
01102
01103
01104
01105 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01106 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
01107 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)
01108 {
01109 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator++ (int)");
01110
01111 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
01112 ++*this;
01113 return retv;
01114 }
01115
01116
01117
01118
01119 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01120 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> &
01121 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)
01122 {
01123 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (void)");
01124
01125 this->forward_i ();
01126 return *this;
01127 }
01128
01129
01130
01131
01132 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01133 ACE_INLINE ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>
01134 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)
01135 {
01136 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::operator-- (int)");
01137
01138 ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK> retv (*this);
01139 --*this;
01140 return retv;
01141 }
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154 template <class EXT_ID, class INT_ID, class COMPARE_KEYS, class ACE_LOCK>
01155 ACE_INLINE int
01156 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
01157 {
01158 ACE_TRACE ("ACE_RB_Tree_Reverse_Iterator<EXT_ID, INT_ID, COMPARE_KEYS, ACE_LOCK>::next");
01159
01160 if (this->node_)
01161 {
01162 next_entry = this->node_;
01163 return 1;
01164 }
01165
01166 return 0;
01167 }
01168
01169 ACE_END_VERSIONED_NAMESPACE_DECL