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