Hash_Multi_Map_Manager_T.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  * @file    Hash_Multi_Map_Manager_T.h
00006  *
00007  * $Id: Hash_Multi_Map_Manager_T.h 80826 2008-03-04 14:51:23Z wotte $
00008  *
00009  * The code in Hash_Multi_Map_Manager_T.* was based on the code in
00010  * Hash_Map_Manager_T.*.
00011  *
00012  * ACE_Hash_Multi_Map_Manager maps a key type to more than one value types.
00013  * The template takes the key and value types as parameters. The bind and
00014  * unbind operations can take a key and the value or the set of the values that
00015  * is to be associated with that key. The find operation can take a key or a
00016  * key and the value that is associated with the key.
00017  *
00018  * ACE_Hash_Multi_Map_Manager uses @c ACE_Unbounded_Set to store differet values
00019  * with the same key.
00020  *
00021  * @author Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
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 /* ACE_LACKS_PRAGMA_ONCE */
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  * @class ACE_Hash_Multi_Map_Entry
00045  *
00046  * @brief Define an entry in the hash table.
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   // = Initialization and termination methods.
00058   /// Constructor.
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   /// Constructor.
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   /// Destructor.
00070   ~ACE_Hash_Multi_Map_Entry (void);
00071   #endif /* ! defined (ACE_HAS_BROKEN_NOOP_DTORS) */
00072 
00073   /// Key accessor.
00074   EXT_ID& key (void);
00075 
00076   /// Item accessor.
00077   ACE_Unbounded_Set<INT_ID>& item (void);
00078 
00079   /// Key used to look up an entry.
00080   /// @deprecated Use key()
00081   EXT_ID ext_id_;
00082 
00083   /// The contents of the entry itself.
00084   /// @deprecated Use item()
00085   ACE_Unbounded_Set<INT_ID> int_id_set_;
00086 
00087   /// Pointer to the next item in the bucket of overflow nodes.
00088   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *next_;
00089 
00090   /// Pointer to the prev item in the bucket of overflow nodes.
00091   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *prev_;
00092 
00093   /// Dump the state of an object.
00094   void dump (void) const;
00095 };
00096 
00097 // Forward decl.
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 // Forward decl.
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 // Forward decl.
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 // Forward decl.
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 // Forward decl.
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 // Forward decl.
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 // Forward decl.
00122 class ACE_Allocator;
00123 
00124 /**
00125  * @class ACE_Hash_Multi_Map_Manager
00126  *
00127  * @brief Define a multi-map abstraction that efficiently associates the keys
00128  * with their different values.
00129  *
00130  * This implementation of a multi-map uses a hash table.  Key hashing
00131  * is achieved through the @c HASH_KEY object and key comparison is
00132  * achieved through the @c COMPARE_KEYS object.
00133  * This class uses an @c ACE_Allocator to allocate memory.  The
00134  * user can make this a persistent class by providing an
00135  * @c ACE_Allocator with a persistable memory pool.
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   // = ACE-style iterator typedefs.
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   // = STL-style iterator typedefs.
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   // = Initialization and termination methods.
00174 
00175   /**
00176    * Initialize a @c Hash_Multi_Map_Manager with default size elements.
00177    * @param table_alloc is a pointer to a memory allocator used for
00178    *        table_, so it should supply size*sizeof (
00179    *        ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>).
00180    * @param entry_alloc is a pointer to an additional allocator for
00181    *        entries, so it should be able to allocate 'size' / chunks
00182    *        of sizeof (ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>) bytes
00183    *        each.
00184    * If @a table_alloc is 0 it defaults to @c ACE_Allocator::instance().
00185    * If @a entry_alloc is 0 then it defaults to the same allocator as
00186    * @a table_alloc.
00187    */
00188   ACE_Hash_Multi_Map_Manager (ACE_Allocator *table_alloc = 0,
00189                               ACE_Allocator *entry_alloc = 0);
00190 
00191   /**
00192    * Initialize a @c Hash_Multi_Map_Manager with @a size elements.
00193    * @param size is the number of elements in a Hash_Multi_Map_Manager.
00194    * @param table_alloc is a pointer to a memory allocator used for
00195    *        table_, so it should supply size*sizeof (
00196    *        ACE_Hash_Multi_Map_Entry<@c EXT_ID, <@c INT_ID>).
00197    * @param entry_alloc is a pointer to an additional allocator for
00198    *        entries, so it should be able to allocate 'size' / chunks
00199    *        of sizeof (ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>) bytes
00200    *        each.
00201    * If @a table_alloc is 0 it defaults to @c ACE_Allocator::instance().
00202    * If @a entry_alloc is 0 then it defaults to the same allocator as
00203    * @a table_alloc.
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    * Initialize a @c Hash_Multi_Map_Manager with @a size elements.
00211    * @param size is the number of elements in a Hash_Multi_Map_Manager.
00212    * @param table_alloc is a pointer to a memory allocator used for
00213    *        table_, so it should supply size*sizeof
00214    *        (ACE_Hash_Multi_Map_Entry<@c EXT_ID, <@c INT_ID>).
00215    * @param entry_alloc is a pointer to an additional allocator for
00216    *        entries, so it should be able to allocate 'size' / chunks
00217    *        of sizeof (ACE_Hash_Multi_Map_Entry<@c EXT_ID, <@c INT_ID>) bytes
00218    *        each.
00219    * If @a table_alloc is 0 it defaults to @c ACE_Allocator::instance().
00220    * If @a entry_alloc is 0 then it defaults to the same allocator as
00221    * @a table_alloc.
00222    * @return -1 on failure, 0 on success
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   /// Close down a Hash_Multi_Map_Manager and release dynamically allocated
00230   /// resources.
00231   int close (void);
00232 
00233   /// Removes all the entries in Hash_Multi_Map_Manager.
00234   int unbind_all (void);
00235 
00236   /// Cleanup the Hash_Multi_Map_Manager.
00237   ~ACE_Hash_Multi_Map_Manager (void);
00238 
00239   /**
00240    * Associate @a ext_id with @a int_id.  If @a ext_id and @a int_id is already
00241    * in the map then the @c ACE_Hash_Multi_Map_Entry is not changed.  Returns 0 if
00242    * a new entry is bound successfully, returns 1 if an attempt is made
00243    * to bind an existing entry, and returns -1 if failures occur.
00244    */
00245   int bind (const EXT_ID &ext_id,
00246             const INT_ID &int_id);
00247 
00248   /**
00249    * Same as a normal bind, except the map entry is also passed back
00250    * to the caller.  The entry in this case will either be the newly
00251    * created entry, or the existing one.
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    * Associate @a ext_id with @a int_id_set.  If @a ext_id is already in the
00259    * map then the @c ACE_Hash_Multi_Map_Entry is not changed.  Returns 0 if a
00260    * new entry is bound successfully, returns 1 if an attempt is made
00261    * to bind an existing entry, and returns -1 if failures occur.
00262    */
00263   int bind (const EXT_ID &ext_id,
00264             const ACE_Unbounded_Set<INT_ID> &int_id_set);
00265 
00266   /**
00267    * Same as a normal bind, except the map entry is also passed back
00268    * to the caller.  The entry in this case will either be the newly
00269    * created entry, or the existing one.
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    * Associate @a ext_id with @a int_id_set if and only if @a ext_id is
00277    * not in the map.  If @a ext_id is already in the map then the @a int_id_set
00278    * parameter is assigned the existing value in the map.  Returns 0
00279    * if a new entry is bound successfully, returns 1 if an attempt is
00280    * made to bind an existing entry, and returns -1 if failures occur.
00281    */
00282   int trybind (const EXT_ID &ext_id,
00283                ACE_Unbounded_Set<INT_ID> &int_id_set);
00284 
00285   /**
00286    * Same as a normal trybind, except the map entry is also passed
00287    * back to the caller.  The entry in this case will either be the
00288    * newly created entry, or the existing one.
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    * Reassociate @a ext_id with @a int_id_set.  If @a ext_id is not in
00296    * the map then behaves just like bind.  Returns 0 if a new entry is
00297    * bound successfully, returns 1 if an existing entry was rebound,
00298    * and returns -1 if failures occur.
00299    */
00300   int rebind (const EXT_ID &ext_id,
00301               const ACE_Unbounded_Set<INT_ID> &int_id_set);
00302 
00303   /**
00304    * Same as a normal rebind, except the map entry is also passed back
00305    * to the caller.  The entry in this case will either be the newly
00306    * created entry, or the existing one.
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    * Associate @a ext_id with @a int_id_set.  If @a ext_id is not in the map
00314    * then behaves just like bind.  Otherwise, store the old value of
00315    * @a int_id_set into the "out" parameter and rebind the new parameters.
00316    * Returns 0 if a new entry is bound successfully, returns 1 if an
00317    * existing entry was rebound, and returns -1 if failures occur.
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    * Same as a normal rebind, except the map entry is also passed back
00325    * to the caller.  The entry in this case will either be the newly
00326    * created entry, or the existing one.
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    * Associate @a ext_id with @a int_id_set.  If @a ext_id is not in the map
00335    * then behaves just like bind.  Otherwise, store the old values
00336    * of @a ext_id and @a int_id_set into the "out" parameters and rebind the
00337    * new parameters.  This is very useful if you need to have an
00338    * atomic way of updating @c ACE_Hash_Multi_Map_Entry objects and you also
00339    * need full control over memory allocation.  Returns 0 if a new entry
00340    * is bound successfully, returns 1 if an existing entry was rebound,
00341    * and returns -1 if failures occur.
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    * Same as a normal rebind, except the map entry is also passed back
00350    * to the caller.  The entry in this case will either be the newly
00351    * created entry, or the existing one.
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   /// Locate @a ext_id and pass out parameter via @a int_id_set.
00360   /// Return 0 if found, returns -1 if not found.
00361   int find (const EXT_ID &ext_id,
00362             ACE_Unbounded_Set<INT_ID> &int_id_set) const;
00363 
00364   /// Locate @a ext_id and @a int_id.
00365   /// Return 0 if found, returns -1 if not found.
00366   int find (const EXT_ID &ext_id,
00367             const INT_ID &int_id) const;
00368 
00369   /// Returns 0 if the @a ext_id is in the mapping, otherwise -1.
00370   int find (const EXT_ID &ext_id) const;
00371 
00372   /// Locate @a ext_id and pass out parameter via @a entry.  If found,
00373   /// return 0, returns -1 if not found.
00374   int find (const EXT_ID &ext_id,
00375             ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *&entry) const;
00376 
00377   /**
00378    * Unbind (remove) the @a ext_id from the map.  Don't return the
00379    * int_id to the caller (this is useful for collections where the
00380    * int_ids are *not* dynamically allocated...)
00381    */
00382   int unbind (const EXT_ID &ext_id);
00383 
00384   /// Break any association of @a ext_id.  Returns the value of @a int_id_set
00385   /// in case the caller needs to deallocate memory. Return 0 if the
00386   /// unbind was successfully, and returns -1 if failures occur.
00387   int unbind (const EXT_ID &ext_id,
00388               ACE_Unbounded_Set<INT_ID> &int_id_set);
00389 
00390   /// Break any association of @a ext_id and @a int_id. Return 0 if the
00391   /// unbind was successfully, and returns -1 if failures occur.
00392   int unbind (const EXT_ID &ext_id,
00393               const INT_ID &int_id);
00394 
00395   /// Remove @a entry from map. Return 0 if the unbind was successfully,
00396   /// and returns -1 if failures occur.
00397   int unbind (ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *entry);
00398 
00399   /// Returns the current number of @c ACE_Hash_Multi_Map_Entry objects in the
00400   /// hash table.
00401   size_t current_size (void) const;
00402 
00403   /// Return the size of the array that's used to point to the
00404   /// linked lists of @c ACE_Hash_Multi_Map_Entry objects in the hash table.
00405   size_t total_size (void) const;
00406 
00407   /**
00408    * Returns a reference to the underlying @c ACE_LOCK.  This makes it
00409    * possible to acquire the lock explicitly, which can be useful in
00410    * some cases if you instantiate the @c ACE_Atomic_Op with an
00411    * @c ACE_Recursive_Mutex or @c ACE_Process_Mutex, or if you need to
00412    * guard the state of an iterator.
00413    * @note The right name would be lock, but HP/C++ will choke on that!
00414    */
00415   ACE_LOCK &mutex (void);
00416 
00417   /// Dump the state of an object.
00418   void dump (void) const;
00419 
00420   // = STL styled iterator factory functions.
00421 
00422   /// Return forward iterator.
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   /// Return reverse iterator.
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   // = The following methods do the actual work.
00432 
00433   /// Returns 1 if @a id1 == @a id2, else 0.  This is defined as a
00434   /// separate method to facilitate template specialization.
00435   int equal (const EXT_ID &id1, const EXT_ID &id2);
00436 
00437   /// Compute the hash value of the @a ext_id.  This is defined as a
00438   /// separate method to facilitate template specialization.
00439   u_long hash (const EXT_ID &ext_id);
00440 
00441   // = These methods assume locks are held by private methods.
00442 
00443   /// Performs bind.  Must be called with locks held.
00444   int bind_i (const EXT_ID &ext_id,
00445               const INT_ID &int_id);
00446 
00447   /// Performs bind.  Must be called with locks held.
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   /// Performs bind.  Must be called with locks held.
00453   int bind_i (const EXT_ID &ext_id,
00454               const ACE_Unbounded_Set<INT_ID> &int_id_set);
00455 
00456   /// Performs bind.  Must be called with locks held.
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   /// Performs trybind.  Must be called with locks held.
00462   int trybind_i (const EXT_ID &ext_id,
00463                  ACE_Unbounded_Set<INT_ID> &int_id_set);
00464 
00465   /// Performs trybind.  Must be called with locks held.
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   /// Performs rebind.  Must be called with locks held.
00471   int rebind_i (const EXT_ID &ext_id,
00472                 const ACE_Unbounded_Set<INT_ID> &int_id_set);
00473 
00474   /// Performs rebind.  Must be called with locks held.
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   /// Performs rebind.  Must be called with locks held.
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   /// Performs rebind.  Must be called with locks held.
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   /// Performs rebind.  Must be called with locks held.
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   /// Performs rebind.  Must be called with locks held.
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   /// Performs a find of @a int_id_set using @a ext_id as the key.  Must be
00504   /// called with locks held.
00505   int find_i (const EXT_ID &ext_id,
00506               ACE_Unbounded_Set<INT_ID> &int_id_set);
00507 
00508   /// Performs a find of @a ext_id and @a int_id.  Must be
00509   /// called with locks held.
00510   int find_i (const EXT_ID &ext_id,
00511               const INT_ID &int_id);
00512 
00513   /// Performs a find using @a ext_id as the key.  Must be called with
00514   /// locks held.
00515   int find_i (const EXT_ID &ext_id);
00516 
00517   /// Performs a find using @a ext_id as the key.  Must be called with
00518   /// locks held.
00519   int find_i (const EXT_ID &ext_id,
00520               ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *&entry);
00521 
00522   /// Performs unbind.  Must be called with locks held.
00523   int unbind_i (const EXT_ID &ext_id,
00524                 ACE_Unbounded_Set<INT_ID> &int_id_set);
00525 
00526   /// Performs unbind.  Must be called with locks held.
00527   int unbind_i (const EXT_ID &ext_id,
00528                 const INT_ID &int_id);
00529 
00530   /// Performs unbind.  Must be called with locks held.
00531   int unbind_i (const EXT_ID &ext_id);
00532 
00533   /// Performs unbind.  Must be called with locks held.
00534   int unbind_i (ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *entry);
00535 
00536   /**
00537    * Resize the map.  Must be called with locks held.
00538    * @note This method should never be called more than once or else all the
00539    * hashing will get screwed up as the size will change.
00540    */
00541   int create_buckets (size_t size);
00542 
00543   /// Close down a Map_Manager.  Must be called with
00544   /// locks held.
00545   int close_i (void);
00546 
00547   /// Removes all the entries in Map_Manager.  Must be called with
00548   /// locks held.
00549   int unbind_all_i (void);
00550 
00551   /// Pointer to a memory allocator used for table_, so it should
00552   /// supply size*sizeof (@c ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>),
00553   ACE_Allocator *table_allocator_;
00554 
00555   /// Addidtional allocator for entries, so it should be able to
00556   /// allocate 'size' / chunks of sizeof 
00557   /// (@c ACE_Hash_Multi_Map_Entry<@c EXT_ID, @c INT_ID>) bytes each.
00558   ACE_Allocator *entry_allocator_;
00559 
00560   /// Synchronization variable for the MT_SAFE
00561   /// @c ACE_Hash_Multi_Map_Manager.
00562   ACE_LOCK lock_;
00563 
00564   /// Function object used for hashing keys.
00565   HASH_KEY hash_key_;
00566 
00567   /// Function object used for comparing keys.
00568   COMPARE_KEYS compare_keys_;
00569 
00570 protected:
00571   /// Returns the @c ACE_Hash_Multi_Map_Entry object that corresponds to
00572   /// @a ext_id.
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   /// Accessor of the underlying table
00578   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *table (void);
00579 
00580   /// Accessor of the current size attribute
00581   size_t cur_size (void) const;
00582 
00583 private:
00584   /**
00585    * Array of the pointers to @c ACE_Hash_Multi_Map_Entry objects, each of
00586    * which points to an @c ACE_Hash_Multi_Map_Entry that serves as the
00587    * beginning of a linked list of @c EXT_ID that hash to that bucket.
00588    */
00589   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *table_;
00590 
00591   /// Total size of the hash table.
00592   size_t total_size_;
00593 
00594   /// Current number of entries in the table
00595   /// @note That this can be larger than total_size_ due to the
00596   /// bucket chaining).
00597   size_t cur_size_;
00598 
00599   // = Disallow these operations.
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  * @class ACE_Hash_Multi_Map_Iterator_Base
00606  *
00607  * @brief Base iterator for the @c ACE_Hash_Multi_Map_Manager
00608  *
00609  * This class factors out common code from its templatized
00610  * subclasses.
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   // = Initialization method.
00617   /// Contructor.  If @a head != 0, the iterator constructed is positioned
00618   /// at the head of the map, it is positioned at the end otherwise.
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   // = ITERATION methods.
00623 
00624   /// Pass back the @a next_entry that hasn't been seen in the Set.
00625   /// Returns 0 when all items have been seen, else 1.
00626   int next (ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
00627 
00628   /// Returns 1 when all items have been seen, else 0.
00629   int done (void) const;
00630 
00631   /// Returns a reference to the interal element this object is pointing to.
00632   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
00633 
00634   /// Returns a pointer to the interal element this object is pointing to.
00635   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID>* operator-> (void) const;
00636 
00637   /// Returns reference the @c Hash_Multi_Map_Manager that is being iterated
00638   /// over.
00639   ACE_Hash_Multi_Map_Manager<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
00640 
00641   /// Check if two iterators point to the same position
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   /// Declare the dynamic allocation hooks.
00646   ACE_ALLOC_HOOK_DECLARE;
00647 
00648 protected:
00649   /// Move forward by one element in the set.  Returns 0 when there's
00650   /// no more item in the set after the current items, else 1.
00651   int forward_i (void);
00652 
00653   /// Move backward by one element in the set.  Returns 0 when there's
00654   /// no more item in the set before the current item, else 1.
00655   int reverse_i (void);
00656 
00657   /// Dump the state of an object.
00658   void dump_i (void) const;
00659 
00660   /// Map we are iterating over.
00661   ACE_Hash_Multi_Map_Manager<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;
00662 
00663   /// Keeps track of how far we've advanced in the table.
00664   ssize_t index_;
00665 
00666   /// Keeps track of how far we've advanced in a linked list in each
00667   /// table slot.
00668   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *next_;
00669 };
00670 
00671 /**
00672  * @class ACE_Hash_Multi_Map_Const_Iterator_Base
00673  *
00674  * @brief Base const iterator for the @c ACE_Hash_Multi_Map_Manager
00675  *
00676  * This class factors out common code from its templatized
00677  * subclasses.
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   // = Initialization method.
00684   /// Contructor.  If @a head != 0, the iterator constructed is positioned
00685   /// at the head of the map, it is positioned at the end otherwise.
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   // = ITERATION methods.
00690 
00691   /// Pass back the @a next_entry that hasn't been seen in the Set.
00692   /// Returns 0 when all items have been seen, else 1.
00693   int next (ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *&next_entry) const;
00694 
00695   /// Returns 1 when all items have been seen, else 0.
00696   int done (void) const;
00697 
00698   /// Returns a reference to the interal element this object is pointing to.
00699   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
00700 
00701   /// Returns a pointer to the interal element this object is pointing to.
00702   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID>* operator-> (void) const;
00703 
00704   /// Returns reference the @c Hash_Multi_Map_Manager that is being iterated
00705   /// over.
00706   const ACE_Hash_Multi_Map_Manager<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
00707 
00708   /// Check if two iterators point to the same position
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   /// Declare the dynamic allocation hooks.
00713   ACE_ALLOC_HOOK_DECLARE;
00714 
00715 protected:
00716   /// Move forward by one element in the set.  Returns 0 when there's
00717   /// no more item in the set after the current items, else 1.
00718   int forward_i (void);
00719 
00720   /// Move backward by one element in the set.  Returns 0 when there's
00721   /// no more item in the set before the current item, else 1.
00722   int reverse_i (void);
00723 
00724   /// Dump the state of an object.
00725   void dump_i (void) const;
00726 
00727   /// Map we are iterating over.
00728   const ACE_Hash_Multi_Map_Manager<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;
00729 
00730   /// Keeps track of how far we've advanced in the table.
00731   ssize_t index_;
00732 
00733   /// Keeps track of how far we've advanced in a linked list in each
00734   /// table slot.
00735   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *next_;
00736 };
00737 
00738 /**
00739  * @class ACE_Hash_Multi_Map_Iterator
00740  *
00741  * @brief Forward iterator for the @c ACE_Hash_Multi_Map_Manager.
00742  *
00743  * This class does not perform any internal locking of the
00744  * @c ACE_Hash_Multi_Map_Manager it is iterating upon since locking is
00745  * inherently inefficient and/or error-prone within an STL-style
00746  * iterator.  If you require locking, you can explicitly use an
00747  * @c ACE_Guard or @c ACE_Read_Guard on the @c ACE_Hash_Multi_Map_Manager's
00748  * internal lock, which is accessible via its @c mutex method.
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   // = Initialization method.
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   // = Iteration methods.
00759   /// Move forward by one element in the set.  Returns 0 when all the
00760   /// items in the set have been seen, else 1.
00761   int advance (void);
00762 
00763   /// Dump the state of an object.
00764   void dump (void) const;
00765 
00766   // = STL styled iteration, compare, and reference functions.
00767 
00768   /// Prefix advance.
00769   ACE_Hash_Multi_Map_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
00770 
00771   /// Postfix advance.
00772   ACE_Hash_Multi_Map_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
00773 
00774   /// Prefix reverse.
00775   ACE_Hash_Multi_Map_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
00776 
00777   /// Postfix reverse.
00778   ACE_Hash_Multi_Map_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
00779 
00780   /// Declare the dynamic allocation hooks.
00781   ACE_ALLOC_HOOK_DECLARE;
00782 };
00783 
00784 /**
00785  * @class ACE_Hash_Multi_Map_Const_Iterator
00786  *
00787  * @brief Const forward iterator for the @c ACE_Hash_Multi_Map_Manager.
00788  *
00789  * This class does not perform any internal locking of the
00790  * @c ACE_Hash_Multi_Map_Manager it is iterating upon since locking is
00791  * inherently inefficient and/or error-prone within an STL-style
00792  * iterator.  If you require locking, you can explicitly use an
00793  * @c ACE_Guard or @c ACE_Read_Guard on the @c ACE_Hash_Multi_Map_Manager's
00794  * internal lock, which is accessible via its @c mutex method.
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   // = Initialization method.
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   // = Iteration methods.
00805   /// Move forward by one element in the set.  Returns 0 when all the
00806   /// items in the set have been seen, else 1.
00807   int advance (void);
00808 
00809   /// Dump the state of an object.
00810   void dump (void) const;
00811 
00812   // = STL styled iteration, compare, and reference functions.
00813 
00814   /// Prefix advance.
00815   ACE_Hash_Multi_Map_Const_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
00816 
00817   /// Postfix advance.
00818   ACE_Hash_Multi_Map_Const_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
00819 
00820   /// Prefix reverse.
00821   ACE_Hash_Multi_Map_Const_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
00822 
00823   /// Postfix reverse.
00824   ACE_Hash_Multi_Map_Const_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
00825 
00826   /// Declare the dynamic allocation hooks.
00827   ACE_ALLOC_HOOK_DECLARE;
00828 };
00829 
00830 /**
00831  * @class ACE_Hash_Multi_Map_Bucket_Iterator
00832  *
00833  * @brief Forward iterator for the @c ACE_Hash_Multi_Map_Manager which
00834  * only traverses a particular bucket.  The particular bucket is
00835  * specified by the @c EXT_ID parameter specified in the constructor.
00836  *
00837  * This class does not perform any internal locking of the
00838  * @c ACE_Hash_Multi_Map_Manager it is iterating upon since locking is
00839  * inherently inefficient and/or error-prone within an STL-style
00840  * iterator.  If you require locking, you can explicitly use an
00841  * @c ACE_Guard or @c ACE_Read_Guard on the @c ACE_Hash_Multi_Map_Manager's
00842  * internal lock, which is accessible via its @c mutex method.
00843  *
00844  * Note that a creation method for this new iterator cannot be added
00845  * to the hash map, since this would require adding explicit template
00846  * instantiations for bucket iterators on platforms with broken
00847  * templates.
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   // = Initialization method.
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   // = STL styled iteration, compare, and reference functions.
00859 
00860   /// Prefix advance.
00861   ACE_Hash_Multi_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
00862 
00863   /// Postfix advance.
00864   ACE_Hash_Multi_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
00865 
00866   /// Prefix reverse.
00867   ACE_Hash_Multi_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
00868 
00869   /// Postfix reverse.
00870   ACE_Hash_Multi_Map_Bucket_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
00871 
00872   /// Returns a reference to the interal element this object is pointing to.
00873   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID>& operator* (void) const;
00874 
00875   /// Returns a pointer to the interal element this object is pointing to.
00876   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID>* operator-> (void) const;
00877 
00878   /// Returns reference the Hash_Multi_Map_Manager that is being iterated
00879   /// over.
00880   ACE_Hash_Multi_Map_Manager<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK>& map (void);
00881 
00882   /// Check if two iterators point to the same position
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   /// Move forward by one element in the set.  Returns 0 when there's
00888   /// no more item in the set after the current items, else 1.
00889   int forward_i (void);
00890 
00891   /// Move backward by one element in the set.  Returns 0 when there's
00892   /// no more item in the set before the current item, else 1.
00893   int reverse_i (void);
00894 
00895   /// Map we are iterating over.
00896   ACE_Hash_Multi_Map_Manager<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> *map_man_;
00897 
00898   /// Keeps track of how far we've advanced in the table.
00899   ssize_t index_;
00900 
00901   /// Keeps track of how far we've advanced in a linked list in each
00902   /// table slot.
00903   ACE_Hash_Multi_Map_Entry<EXT_ID, INT_ID> *next_;
00904 };
00905 
00906 /**
00907  * @class ACE_Hash_Multi_Map_Reverse_Iterator
00908  *
00909  * @brief Reverse iterator for the @c ACE_Hash_Multi_Map_Manager.
00910  *
00911  * This class does not perform any internal locking of the
00912  * @c ACE_Hash_Multi_Map_Manager it is iterating upon since locking is
00913  * inherently inefficient and/or error-prone within an STL-style
00914  * iterator.  If you require locking, you can explicitly use an
00915  * @c ACE_Guard or @c ACE_Read_Guard on the @c ACE_Hash_Multi_Map_Manager's
00916  * internal lock, which is accessible via its @c mutex method.
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   // = Initialization method.
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   // = Iteration methods.
00927   /// Move forward by one element in the set.  Returns 0 when all the
00928   /// items in the set have been seen, else 1.
00929   int advance (void);
00930 
00931   /// Dump the state of an object.
00932   void dump (void) const;
00933 
00934   // = STL styled iteration, compare, and reference functions.
00935 
00936   /// Prefix reverse.
00937   ACE_Hash_Multi_Map_Reverse_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator++ (void);
00938 
00939   /// Postfix reverse.
00940   ACE_Hash_Multi_Map_Reverse_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator++ (int);
00941 
00942   /// Prefix advance.
00943   ACE_Hash_Multi_Map_Reverse_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> &operator-- (void);
00944 
00945   /// Postfix advance.
00946   ACE_Hash_Multi_Map_Reverse_Iterator<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> operator-- (int);
00947 
00948   /// Declare the dynamic allocation hooks.
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 /* __ACE_INLINE__ */
00957 
00958 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00959 #include "ace/Hash_Multi_Map_Manager_T.cpp"
00960 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00961 
00962 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00963 #pragma implementation ("Hash_Multi_Map_Manager_T.cpp")
00964 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00965 
00966 #include /**/ "ace/post.h"
00967 #endif /* ACE_HASH_MULTI_MAP_MANAGER_T_H */

Generated on Tue Feb 2 17:18:39 2010 for ACE by  doxygen 1.4.7