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