00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ACE_HASH_MAP_MANAGER_T_H
00014 #define ACE_HASH_MAP_MANAGER_T_H
00015 #include "ace/pre.h"
00016
00017 #include "ace/config-all.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif
00022
00023 #include "ace/Default_Constants.h"
00024 #include "ace/Functor_T.h"
00025 #include "ace/Log_Msg.h"
00026
00027 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029
00030
00031
00032
00033
00034 template <class EXT_ID, class INT_ID>
00035 class ACE_Hash_Map_Entry
00036 {
00037 public:
00038
00039
00040 ACE_Hash_Map_Entry (const EXT_ID &ext_id,
00041 const INT_ID &int_id,
00042 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next = 0,
00043 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev = 0);
00044
00045
00046 ACE_Hash_Map_Entry (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next,
00047 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev);
00048
00049 # if ! defined (ACE_HAS_BROKEN_NOOP_DTORS)
00050
00051 ~ACE_Hash_Map_Entry (void);
00052 #endif
00053
00054
00055 EXT_ID& key (void);
00056
00057
00058 INT_ID& item (void);
00059
00060
00061
00062 EXT_ID ext_id_;
00063
00064
00065
00066 INT_ID int_id_;
00067
00068
00069 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next_;
00070
00071
00072 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *prev_;
00073
00074
00075 void dump (void) const;
00076 };
00077
00078
00079 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00080 class ACE_Hash_Map_Iterator_Base_Ex;
00081
00082
00083 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00084 class ACE_Hash_Map_Const_Iterator_Base_Ex;
00085
00086
00087 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00088 class ACE_Hash_Map_Iterator_Ex;
00089
00090
00091 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00092 class ACE_Hash_Map_Const_Iterator_Ex;
00093
00094
00095 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00096 class ACE_Hash_Map_Reverse_Iterator_Ex;
00097
00098
00099 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00100 class ACE_Hash_Map_Bucket_Iterator;
00101
00102
00103 class ACE_Allocator;
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00120 class ACE_Hash_Map_Manager_Ex
00121 {
00122 public:
00123 friend class ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
00124 friend class ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
00125 friend class ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
00126 friend class ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
00127 friend class ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
00128 friend class ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>;
00129
00130 typedef EXT_ID
00131 KEY;
00132 typedef INT_ID
00133 VALUE;
00134 typedef ACE_LOCK lock_type;
00135 typedef ACE_Hash_Map_Entry<EXT_ID, INT_ID>
00136 ENTRY;
00137
00138
00139 typedef ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00140 ITERATOR;
00141 typedef ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00142 CONST_ITERATOR;
00143 typedef ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00144 REVERSE_ITERATOR;
00145
00146
00147 typedef ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00148 iterator;
00149 typedef ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00150 const_iterator;
00151 typedef ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00152 reverse_iterator;
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167 ACE_Hash_Map_Manager_Ex (ACE_Allocator *table_alloc = 0,
00168 ACE_Allocator *entry_alloc = 0);
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181 ACE_Hash_Map_Manager_Ex (size_t size,
00182 ACE_Allocator *table_alloc = 0,
00183 ACE_Allocator *entry_alloc = 0);
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198 int open (size_t size = ACE_DEFAULT_MAP_SIZE,
00199 ACE_Allocator *table_alloc = 0,
00200 ACE_Allocator *entry_alloc = 0);
00201
00202
00203
00204 int close (void);
00205
00206
00207 int unbind_all (void);
00208
00209
00210 ~ACE_Hash_Map_Manager_Ex (void);
00211
00212
00213
00214
00215
00216
00217
00218 int bind (const EXT_ID &item,
00219 const INT_ID &int_id);
00220
00221
00222
00223
00224
00225
00226 int bind (const EXT_ID &ext_id,
00227 const INT_ID &int_id,
00228 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00229
00230
00231
00232
00233
00234
00235
00236
00237 int trybind (const EXT_ID &ext_id,
00238 INT_ID &int_id);
00239
00240
00241
00242
00243
00244
00245 int trybind (const EXT_ID &ext_id,
00246 INT_ID &int_id,
00247 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00248
00249
00250
00251
00252
00253
00254
00255 int rebind (const EXT_ID &ext_id,
00256 const INT_ID &int_id);
00257
00258
00259
00260
00261
00262
00263 int rebind (const EXT_ID &ext_id,
00264 const INT_ID &int_id,
00265 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00266
00267
00268
00269
00270
00271
00272
00273
00274 int rebind (const EXT_ID &ext_id,
00275 const INT_ID &int_id,
00276 INT_ID &old_int_id);
00277
00278
00279
00280
00281
00282
00283 int rebind (const EXT_ID &ext_id,
00284 const INT_ID &int_id,
00285 INT_ID &old_int_id,
00286 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298 int rebind (const EXT_ID &ext_id,
00299 const INT_ID &int_id,
00300 EXT_ID &old_ext_id,
00301 INT_ID &old_int_id);
00302
00303
00304
00305
00306
00307
00308 int rebind (const EXT_ID &ext_id,
00309 const INT_ID &int_id,
00310 EXT_ID &old_ext_id,
00311 INT_ID &old_int_id,
00312 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00313
00314
00315
00316 int find (const EXT_ID &ext_id,
00317 INT_ID &int_id) const;
00318
00319
00320 int find (const EXT_ID &ext_id) const;
00321
00322
00323
00324 int find (const EXT_ID &ext_id,
00325 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry) const;
00326
00327
00328
00329
00330
00331
00332 int unbind (const EXT_ID &ext_id);
00333
00334
00335
00336
00337 int unbind (const EXT_ID &ext_id,
00338 INT_ID &int_id);
00339
00340
00341
00342 int unbind (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry);
00343
00344
00345
00346 size_t current_size (void) const;
00347
00348
00349
00350 size_t total_size (void) const;
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360 ACE_LOCK &mutex (void);
00361
00362
00363 void dump (void) const;
00364
00365
00366
00367
00368 ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> begin (void);
00369 ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> end (void);
00370
00371
00372 ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> rbegin (void);
00373 ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> rend (void);
00374
00375 protected:
00376
00377
00378
00379
00380 int equal (const EXT_ID &id1, const EXT_ID &id2);
00381
00382
00383
00384 u_long hash (const EXT_ID &ext_id);
00385
00386
00387
00388
00389 int bind_i (const EXT_ID &ext_id,
00390 const INT_ID &int_id);
00391
00392
00393 int bind_i (const EXT_ID &ext_id,
00394 const INT_ID &int_id,
00395 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00396
00397
00398 int trybind_i (const EXT_ID &ext_id,
00399 INT_ID &int_id);
00400
00401
00402 int trybind_i (const EXT_ID &ext_id,
00403 INT_ID &int_id,
00404 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00405
00406
00407 int rebind_i (const EXT_ID &ext_id,
00408 const INT_ID &int_id);
00409
00410
00411 int rebind_i (const EXT_ID &ext_id,
00412 const INT_ID &int_id,
00413 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00414
00415
00416 int rebind_i (const EXT_ID &ext_id,
00417 const INT_ID &int_id,
00418 INT_ID &old_int_id);
00419
00420
00421 int rebind_i (const EXT_ID &ext_id,
00422 const INT_ID &int_id,
00423 INT_ID &old_int_id,
00424 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00425
00426
00427 int rebind_i (const EXT_ID &ext_id,
00428 const INT_ID &int_id,
00429 EXT_ID &old_ext_id,
00430 INT_ID &old_int_id);
00431
00432
00433 int rebind_i (const EXT_ID &ext_id,
00434 const INT_ID &int_id,
00435 EXT_ID &old_ext_id,
00436 INT_ID &old_int_id,
00437 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00438
00439
00440
00441 int find_i (const EXT_ID &ext_id,
00442 INT_ID &int_id);
00443
00444
00445
00446 int find_i (const EXT_ID &ext_id);
00447
00448
00449
00450 int find_i (const EXT_ID &ext_id,
00451 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry);
00452
00453
00454 int unbind_i (const EXT_ID &ext_id,
00455 INT_ID &int_id);
00456
00457
00458 int unbind_i (const EXT_ID &ext_id);
00459
00460
00461 int unbind_i (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry);
00462
00463
00464
00465
00466
00467
00468 int create_buckets (size_t size);
00469
00470
00471
00472 int close_i (void);
00473
00474
00475
00476 int unbind_all_i (void);
00477
00478
00479
00480 ACE_Allocator *table_allocator_;
00481
00482
00483
00484
00485 ACE_Allocator *entry_allocator_;
00486
00487
00488
00489 ACE_LOCK lock_;
00490
00491
00492 HASH_KEY hash_key_;
00493
00494
00495 COMPARE_KEYS compare_keys_;
00496
00497 protected:
00498
00499 int shared_find (const EXT_ID &ext_id,
00500 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&entry,
00501 size_t &loc);
00502
00503
00504 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *table (void);
00505
00506
00507 size_t cur_size (void) const;
00508
00509 private:
00510
00511
00512
00513
00514
00515 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *table_;
00516
00517
00518 size_t total_size_;
00519
00520
00521
00522
00523 size_t cur_size_;
00524
00525
00526 ACE_UNIMPLEMENTED_FUNC (void operator= (const ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &))
00527 ACE_UNIMPLEMENTED_FUNC (ACE_Hash_Map_Manager_Ex (const ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &))
00528 };
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00539 class ACE_Hash_Map_Iterator_Base_Ex
00540 {
00541 public:
00542
00543
00544
00545 ACE_Hash_Map_Iterator_Base_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
00546 int head);
00547
00548
00549
00550
00551
00552 int next (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
00553
00554
00555 int done (void) const;
00556
00557
00558 ACE_Hash_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
00559
00560
00561 ACE_Hash_Map_Entry<EXT_ID, INT_ID>* operator-> (void) const;
00562
00563
00564
00565 ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
00566
00567
00568 bool operator== (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
00569 bool operator!= (const ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
00570
00571
00572 ACE_ALLOC_HOOK_DECLARE;
00573
00574 protected:
00575
00576
00577 int forward_i (void);
00578
00579
00580
00581 int reverse_i (void);
00582
00583
00584 void dump_i (void) const;
00585
00586
00587 ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;
00588
00589
00590 ssize_t index_;
00591
00592
00593
00594 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next_;
00595 };
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00606 class ACE_Hash_Map_Const_Iterator_Base_Ex
00607 {
00608 public:
00609
00610
00611
00612 ACE_Hash_Map_Const_Iterator_Base_Ex (const ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
00613 int head);
00614
00615
00616
00617
00618
00619 int next (ACE_Hash_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
00620
00621
00622 int done (void) const;
00623
00624
00625 ACE_Hash_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
00626
00627
00628 ACE_Hash_Map_Entry<EXT_ID, INT_ID>* operator-> (void) const;
00629
00630
00631
00632 const ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
00633
00634
00635 bool operator== (const ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
00636 bool operator!= (const ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
00637
00638
00639 ACE_ALLOC_HOOK_DECLARE;
00640
00641 protected:
00642
00643
00644 int forward_i (void);
00645
00646
00647
00648 int reverse_i (void);
00649
00650
00651 void dump_i (void) const;
00652
00653
00654 const ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;
00655
00656
00657 ssize_t index_;
00658
00659
00660
00661 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next_;
00662 };
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00677 class ACE_Hash_Map_Iterator_Ex : public ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00678 {
00679 public:
00680
00681 ACE_Hash_Map_Iterator_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
00682 int tail = 0);
00683
00684
00685
00686
00687 int advance (void);
00688
00689
00690 void dump (void) const;
00691
00692
00693
00694
00695 ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
00696
00697
00698 ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
00699
00700
00701 ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
00702
00703
00704 ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
00705
00706
00707 ACE_ALLOC_HOOK_DECLARE;
00708 };
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00723 class ACE_Hash_Map_Const_Iterator_Ex : public ACE_Hash_Map_Const_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00724 {
00725 public:
00726
00727 ACE_Hash_Map_Const_Iterator_Ex (const ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
00728 int tail = 0);
00729
00730
00731
00732
00733 int advance (void);
00734
00735
00736 void dump (void) const;
00737
00738
00739
00740
00741 ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
00742
00743
00744 ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
00745
00746
00747 ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
00748
00749
00750 ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
00751
00752
00753 ACE_ALLOC_HOOK_DECLARE;
00754 };
00755
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00776 class ACE_Hash_Map_Bucket_Iterator
00777 {
00778 public:
00779
00780 ACE_Hash_Map_Bucket_Iterator (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
00781 const EXT_ID &ext_id,
00782 int tail = 0);
00783
00784
00785
00786
00787 ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
00788
00789
00790 ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
00791
00792
00793 ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
00794
00795
00796 ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
00797
00798
00799 ACE_Hash_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
00800
00801
00802 ACE_Hash_Map_Entry<EXT_ID, INT_ID>* operator-> (void) const;
00803
00804
00805
00806 ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
00807
00808
00809 bool operator== (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
00810 bool operator!= (const ACE_Hash_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &) const;
00811
00812 protected:
00813
00814
00815 int forward_i (void);
00816
00817
00818
00819 int reverse_i (void);
00820
00821
00822 ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;
00823
00824
00825 ssize_t index_;
00826
00827
00828
00829 ACE_Hash_Map_Entry<EXT_ID, INT_ID> *next_;
00830 };
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844 template <class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
00845 class ACE_Hash_Map_Reverse_Iterator_Ex : public ACE_Hash_Map_Iterator_Base_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>
00846 {
00847 public:
00848
00849 ACE_Hash_Map_Reverse_Iterator_Ex (ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &mm,
00850 int head = 0);
00851
00852
00853
00854
00855 int advance (void);
00856
00857
00858 void dump (void) const;
00859
00860
00861
00862
00863 ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
00864
00865
00866 ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
00867
00868
00869 ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
00870
00871
00872 ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
00873
00874
00875 ACE_ALLOC_HOOK_DECLARE;
00876 };
00877
00878
00879
00880
00881
00882
00883
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894
00895
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918 template <class EXT_ID, class INT_ID, class ACE_LOCK>
00919 class ACE_Hash_Map_Manager : public ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>
00920 {
00921 public:
00922
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933
00934 ACE_Hash_Map_Manager (ACE_Allocator *table_alloc = 0,
00935 ACE_Allocator *entry_alloc = 0);
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946
00947
00948 ACE_Hash_Map_Manager (size_t size,
00949 ACE_Allocator *table_alloc = 0,
00950 ACE_Allocator *entry_alloc = 0);
00951
00952
00953
00954 int equal (const EXT_ID &id1, const EXT_ID &id2);
00955 u_long hash (const EXT_ID &ext_id);
00956 };
00957
00958
00959
00960
00961
00962
00963 template <class EXT_ID, class INT_ID, class ACE_LOCK>
00964 class ACE_Hash_Map_Iterator : public ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>
00965 {
00966 public:
00967
00968
00969 ACE_Hash_Map_Iterator (ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
00970 int tail = 0);
00971
00972
00973 ACE_Hash_Map_Iterator (const ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
00974
00975
00976 ACE_Hash_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
00977 operator= (const ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
00978 };
00979
00980
00981
00982
00983
00984
00985 template <class EXT_ID, class INT_ID, class ACE_LOCK>
00986 class ACE_Hash_Map_Const_Iterator : public ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>
00987 {
00988 public:
00989
00990
00991 ACE_Hash_Map_Const_Iterator (const ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
00992 int tail = 0);
00993
00994
00995 ACE_Hash_Map_Const_Iterator (const ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
00996
00997
00998 ACE_Hash_Map_Const_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
00999 operator= (const ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
01000 };
01001
01002
01003
01004
01005
01006
01007 template <class EXT_ID, class INT_ID, class ACE_LOCK>
01008 class ACE_Hash_Map_Reverse_Iterator : public ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>
01009 {
01010 public:
01011
01012 ACE_Hash_Map_Reverse_Iterator (ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK> &mm,
01013 int head = 0);
01014
01015
01016 ACE_Hash_Map_Reverse_Iterator (const ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
01017
01018
01019 ACE_Hash_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> &
01020 operator= (const ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> &base);
01021 };
01022
01023 ACE_END_VERSIONED_NAMESPACE_DECL
01024
01025 #if defined (__ACE_INLINE__)
01026 # include "ace/Hash_Map_Manager_T.inl"
01027 #endif
01028
01029 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
01030 #include "ace/Hash_Map_Manager_T.cpp"
01031 #endif
01032
01033 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
01034 #pragma implementation ("Hash_Map_Manager_T.cpp")
01035 #endif
01036
01037 #include "ace/post.h"
01038 #endif