ACE  6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > Class Template Reference

Define a map abstraction that efficiently associates EXT_ID type objects with INT_ID type objects. More...

#include <Hash_Map_Manager_T.h>

Inheritance diagram for ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >:
Inheritance graph
[legend]
Collaboration diagram for ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >:
Collaboration graph
[legend]

Public Types

typedef EXT_ID KEY
 
typedef INT_ID VALUE
 
typedef ACE_LOCK lock_type
 
typedef ACE_Hash_Map_Entry
< EXT_ID, INT_ID > 
ENTRY
 
typedef
ACE_Hash_Map_Iterator_Ex
< EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
ITERATOR
 
typedef
ACE_Hash_Map_Const_Iterator_Ex
< EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
CONST_ITERATOR
 
typedef
ACE_Hash_Map_Reverse_Iterator_Ex
< EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
REVERSE_ITERATOR
 
typedef
ACE_Hash_Map_Const_Reverse_Iterator_Ex
< EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
CONST_REVERSE_ITERATOR
 
typedef
ACE_Hash_Map_Iterator_Ex
< EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
iterator
 
typedef
ACE_Hash_Map_Const_Iterator_Ex
< EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
const_iterator
 
typedef
ACE_Hash_Map_Reverse_Iterator_Ex
< EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
reverse_iterator
 
typedef
ACE_Hash_Map_Const_Reverse_Iterator_Ex
< EXT_ID, INT_ID, HASH_KEY,
COMPARE_KEYS, ACE_LOCK > 
const_reverse_iterator
 
typedef EXT_ID key_type
 
typedef INT_ID data_type
 
typedef ACE_Hash_Map_Entry
< EXT_ID, INT_ID > 
value_type
 
typedef value_typereference
 
typedef value_type const & const_reference
 
typedef value_typepointer
 
typedef value_type const * const_pointer
 
typedef ptrdiff_t difference_type
 
typedef size_t size_type
 

Public Member Functions

 ACE_Hash_Map_Manager_Ex (ACE_Allocator *table_alloc=0, ACE_Allocator *entry_alloc=0)
 
 ACE_Hash_Map_Manager_Ex (size_t size, ACE_Allocator *table_alloc=0, ACE_Allocator *entry_alloc=0)
 
int open (size_t size=ACE_DEFAULT_MAP_SIZE, ACE_Allocator *table_alloc=0, ACE_Allocator *entry_alloc=0)
 
int close (void)
 
int unbind_all (void)
 Removes all the entries in the ACE_Hash_Map_Manager_Ex. More...
 
 ~ACE_Hash_Map_Manager_Ex (void)
 Cleanup the ACE_Hash_Map_Manager_Ex. More...
 
int bind (const EXT_ID &item, const INT_ID &int_id)
 
int bind (const EXT_ID &ext_id, const INT_ID &int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 
int trybind (const EXT_ID &ext_id, INT_ID &int_id)
 
int trybind (const EXT_ID &ext_id, INT_ID &int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 
int rebind (const EXT_ID &ext_id, const INT_ID &int_id)
 
int rebind (const EXT_ID &ext_id, const INT_ID &int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 
int rebind (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id)
 
int rebind (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 
int rebind (const EXT_ID &ext_id, const INT_ID &int_id, EXT_ID &old_ext_id, INT_ID &old_int_id)
 
int rebind (const EXT_ID &ext_id, const INT_ID &int_id, EXT_ID &old_ext_id, INT_ID &old_int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 
int find (const EXT_ID &ext_id, INT_ID &int_id) const
 
int find (const EXT_ID &ext_id) const
 Returns 0 if the ext_id is in the mapping, otherwise -1. More...
 
int find (const EXT_ID &ext_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry) const
 
void find (EXT_ID const &ext_id, iterator &pos) const
 
int unbind (const EXT_ID &ext_id)
 
int unbind (const EXT_ID &ext_id, INT_ID &int_id)
 
int unbind (ACE_Hash_Map_Entry< EXT_ID, INT_ID > *entry)
 Remove entry from map. More...
 
int unbind (iterator pos)
 Remove entry from map pointed to by iterator pos. More...
 
size_t current_size (void) const
 
size_t total_size (void) const
 
ACE_LOCK & mutex (void)
 
void dump (void) const
 Dump the state of an object. More...
 
iterator begin (void)
 Return forward iterator. More...
 
iterator end (void)
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
reverse_iterator rbegin (void)
 Return reverse iterator. More...
 
reverse_iterator rend (void)
 
const_reverse_iterator rbegin (void) const
 
const_reverse_iterator rend (void) const
 

Protected Member Functions

int equal (const EXT_ID &id1, const EXT_ID &id2)
 
u_long hash (const EXT_ID &ext_id)
 
int bind_i (const EXT_ID &ext_id, const INT_ID &int_id)
 Performs bind. Must be called with locks held. More...
 
int bind_i (const EXT_ID &ext_id, const INT_ID &int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 Performs bind. Must be called with locks held. More...
 
int trybind_i (const EXT_ID &ext_id, INT_ID &int_id)
 Performs trybind. Must be called with locks held. More...
 
int trybind_i (const EXT_ID &ext_id, INT_ID &int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 Performs trybind. Must be called with locks held. More...
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id)
 Performs rebind. Must be called with locks held. More...
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 Performs rebind. Must be called with locks held. More...
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id)
 Performs rebind. Must be called with locks held. More...
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 Performs rebind. Must be called with locks held. More...
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, EXT_ID &old_ext_id, INT_ID &old_int_id)
 Performs rebind. Must be called with locks held. More...
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, EXT_ID &old_ext_id, INT_ID &old_int_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 Performs rebind. Must be called with locks held. More...
 
int find_i (const EXT_ID &ext_id, INT_ID &int_id)
 
int find_i (const EXT_ID &ext_id)
 
int find_i (const EXT_ID &ext_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry)
 
int unbind_i (const EXT_ID &ext_id, INT_ID &int_id)
 Performs unbind. Must be called with locks held. More...
 
int unbind_i (const EXT_ID &ext_id)
 Performs unbind. Must be called with locks held. More...
 
int unbind_i (ACE_Hash_Map_Entry< EXT_ID, INT_ID > *entry)
 Performs unbind. Must be called with locks held. More...
 
int create_buckets (size_t size)
 
int close_i (void)
 
int unbind_all_i (void)
 
int shared_find (const EXT_ID &ext_id, ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&entry, size_t &loc)
 Returns the ACE_Hash_Map_Entry that corresponds to ext_id. More...
 
ACE_Hash_Map_Entry< EXT_ID,
INT_ID > * 
table (void)
 Accessor of the underlying table. More...
 

Protected Attributes

ACE_Allocatortable_allocator_
 
ACE_Allocatorentry_allocator_
 
ACE_LOCK lock_
 
HASH_KEY hash_key_
 Function object used for hashing keys. More...
 
COMPARE_KEYS compare_keys_
 Function object used for comparing keys. More...
 

Private Member Functions

void operator= (const ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &)
 
 ACE_Hash_Map_Manager_Ex (const ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &)
 

Private Attributes

ACE_Hash_Map_Entry< EXT_ID,
INT_ID > * 
table_
 
size_t total_size_
 Total size of the hash table. More...
 
size_t cur_size_
 

Friends

class ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
 
class ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
 
class ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
 
class ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
 
class ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
 
class ACE_Hash_Map_Const_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
 
class ACE_Hash_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
 

Detailed Description

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
class ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >

Define a map abstraction that efficiently associates EXT_ID type objects with INT_ID type objects.

This implementation of a map uses a hash table. Key hashing is achieved through the HASH_KEY object and key comparison is achieved through the COMPARE_KEYS object. This class uses an ACE_Allocator to allocate memory. The user can make this a persistent class by providing an ACE_Allocator with a persistable memory pool.

Member Typedef Documentation

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::CONST_ITERATOR
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Const_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::const_iterator
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef value_type const* ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::const_pointer
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef value_type const& ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::const_reference
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Const_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::CONST_REVERSE_ITERATOR
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Const_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::const_reverse_iterator
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef INT_ID ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::data_type
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ptrdiff_t ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::difference_type
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Entry<EXT_ID, INT_ID> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ENTRY
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ITERATOR
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::iterator
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef EXT_ID ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::KEY
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef EXT_ID ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::key_type
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_LOCK ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::lock_type
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef value_type* ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::pointer
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef value_type& ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reference
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::REVERSE_ITERATOR
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Reverse_Iterator_Ex<EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_iterator
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef size_t ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::size_type
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef INT_ID ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::VALUE
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
typedef ACE_Hash_Map_Entry<EXT_ID, INT_ID> ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::value_type

Constructor & Destructor Documentation

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Map_Manager_Ex ( ACE_Allocator table_alloc = 0,
ACE_Allocator entry_alloc = 0 
)
inline

Initialize an ACE_Hash_Map_Manager_Ex with a default number of elements.

Parameters
table_allocis a pointer to a memory allocator used for table_, so it should supply size*sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>). If table_alloc is 0 it defaults to ACE_Allocator::instance().
entry_allocis a pointer to an additional allocator for entries, so it should be able to allocate 'size' / chunks of sizeof(ACE_Hash_Map_Entry<EXT_ID, INT_ID>) bytes each. If entry_alloc is 0 it defaults to the same allocator as table_alloc.
template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Map_Manager_Ex ( size_t  size,
ACE_Allocator table_alloc = 0,
ACE_Allocator entry_alloc = 0 
)
inline

Initialize an ACE_Hash_Map_Manager_Ex with size elements.

Parameters
table_allocis a pointer to a memory allocator used for table_, so it should supply size*sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>). If table_alloc is 0 it defaults to ACE_Allocator::instance().
entry_allocis a pointer to an additional allocator for entries, so it should be able to allocate 'size' / chunks of sizeof(ACE_Hash_Map_Entry<EXT_ID, INT_ID>) bytes each. If entry_alloc is 0 it defaults to the same allocator as table_alloc.
template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::~ACE_Hash_Map_Manager_Ex ( void  )
inline
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::ACE_Hash_Map_Manager_Ex ( const ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &  )
private

Member Function Documentation

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::iterator ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::begin ( void  )
inline

Return forward iterator.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::const_iterator ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::begin ( void  ) const
inline
template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind ( const EXT_ID &  item,
const INT_ID &  int_id 
)
inline

Associate item with int_id. If item is already in the map then the map is not changed.

Return values
0if a new entry is bound successfully.
1if an attempt is made to bind an existing entry.
-1if a failure occurs; check errno for more information.
template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
inline

Same as a normal bind, except the map entry is also passed back to the caller. The entry in this case will either be the newly created entry, or the existing one.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind_i ( const EXT_ID &  ext_id,
const INT_ID &  int_id 
)
inlineprotected

Performs bind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind_i ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
protected

Performs bind. Must be called with locks held.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::close ( void  )
inline

Close down the ACE_Hash_Map_Manager_Ex and release dynamically allocated resources.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::close_i ( void  )
protected

Close down a <Map_Manager_Ex>. Must be called with locks held.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::create_buckets ( size_t  size)
protected

Resize the map. Must be called with locks held.

Note
This method should never be called more than once or else all the hashing will get screwed up as the size will change.
template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
size_t ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::current_size ( void  ) const
inline

Returns the current number of ACE_Hash_Map_Entry objects in the hash table.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
void ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::dump ( void  ) const

Dump the state of an object.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::iterator ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::end ( void  )
inline
template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::const_iterator ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::end ( void  ) const
inline
template<class EXT_ID, class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::equal ( const EXT_ID &  id1,
const EXT_ID &  id2 
)
inlineprotected

Returns 1 if <id1> == <id2>, else 0. This is defined as a separate method to facilitate template specialization.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find ( const EXT_ID &  ext_id,
INT_ID &  int_id 
) const
inline

Locate ext_id and pass out parameter via int_id. Return 0 if found, returns -1 if not found.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find ( const EXT_ID &  ext_id) const
inline

Returns 0 if the ext_id is in the mapping, otherwise -1.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find ( const EXT_ID &  ext_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
) const
inline

Locate ext_id and pass out parameter via entry. If found, return 0, returns -1 if not found.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
void ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find ( EXT_ID const &  ext_id,
iterator pos 
) const

Locate ext_id and pass out an iterator that points to its corresponding value.

Parameters
pospos will be set to end() if not found.
template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find_i ( const EXT_ID &  ext_id,
INT_ID &  int_id 
)
inlineprotected

Performs a find of int_id using ext_id as the key. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find_i ( const EXT_ID &  ext_id)
inlineprotected

Performs a find using ext_id as the key. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find_i ( const EXT_ID &  ext_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
inlineprotected

Performs a find using ext_id as the key. Must be called with locks held.

template<class EXT_ID, class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
u_long ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::hash ( const EXT_ID &  ext_id)
inlineprotected

Compute the hash value of the ext_id. This is defined as a separate method to facilitate template specialization.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_LOCK & ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::mutex ( void  )
inline

Returns a reference to the underlying <ACE_LOCK>. This makes it possible to acquire the lock explicitly, which can be useful in some cases if you instantiate the ACE_Atomic_Op with an ACE_Recursive_Mutex or ACE_Process_Mutex, or if you need to guard the state of an iterator.

Note
The right name would be <lock>, but HP/C++ will choke on that!
template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::open ( size_t  size = ACE_DEFAULT_MAP_SIZE,
ACE_Allocator table_alloc = 0,
ACE_Allocator entry_alloc = 0 
)

Initialize an ACE_Hash_Map_Manager_Ex with size elements.

Parameters
table_allocis a pointer to a memory allocator used for table_, so it should supply size*sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>). If table_alloc is 0 it defaults to ACE_Allocator::instance().
entry_allocis a pointer to an additional allocator for entries, so it should be able to allocate 'size' / chunks of sizeof(ACE_Hash_Map_Entry<EXT_ID, INT_ID>) bytes each. If entry_alloc is 0 then it defaults to the same allocator as table_alloc.
Returns
-1 on failure, 0 on success
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
void ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::operator= ( const ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK > &  )
private
template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_iterator ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rbegin ( void  )
inline

Return reverse iterator.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::const_reverse_iterator ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rbegin ( void  ) const
inline
template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind ( const EXT_ID &  ext_id,
const INT_ID &  int_id 
)
inline

Reassociate ext_id with int_id. If ext_id is not in the map then behaves just like <bind>. Returns 0 if a new entry is bound successfully, returns 1 if an existing entry was rebound, and returns -1 if failures occur.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
inline

Same as a normal rebind, except the map entry is also passed back to the caller. The entry in this case will either be the newly created entry, or the existing one.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
INT_ID &  old_int_id 
)
inline

Associate ext_id with int_id. If ext_id is not in the map then behaves just like <bind>. Otherwise, store the old value of int_id into the "out" parameter and rebind the new parameters. Returns 0 if a new entry is bound successfully, returns 1 if an existing entry was rebound, and returns -1 if failures occur.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
INT_ID &  old_int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
inline

Same as a normal rebind, except the map entry is also passed back to the caller. The entry in this case will either be the newly created entry, or the existing one.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
EXT_ID &  old_ext_id,
INT_ID &  old_int_id 
)
inline

Associate ext_id with int_id. If ext_id is not in the map then behaves just like <bind>. Otherwise, store the old values of ext_id and int_id into the "out" parameters and rebind the new parameters. This is very useful if you need to have an atomic way of updating ACE_Hash_Map_Entrys and you also need full control over memory allocation. Returns 0 if a new entry is bound successfully, returns 1 if an existing entry was rebound, and returns -1 if failures occur.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
EXT_ID &  old_ext_id,
INT_ID &  old_int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
inline

Same as a normal rebind, except the map entry is also passed back to the caller. The entry in this case will either be the newly created entry, or the existing one.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind_i ( const EXT_ID &  ext_id,
const INT_ID &  int_id 
)
inlineprotected

Performs rebind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind_i ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
protected

Performs rebind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind_i ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
INT_ID &  old_int_id 
)
inlineprotected

Performs rebind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind_i ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
INT_ID &  old_int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
protected

Performs rebind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind_i ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
EXT_ID &  old_ext_id,
INT_ID &  old_int_id 
)
inlineprotected

Performs rebind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rebind_i ( const EXT_ID &  ext_id,
const INT_ID &  int_id,
EXT_ID &  old_ext_id,
INT_ID &  old_int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
protected

Performs rebind. Must be called with locks held.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::reverse_iterator ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rend ( void  )
inline
template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::const_reverse_iterator ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::rend ( void  ) const
inline
template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::shared_find ( const EXT_ID &  ext_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry,
size_t &  loc 
)
protected

Returns the ACE_Hash_Map_Entry that corresponds to ext_id.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
ACE_Hash_Map_Entry< EXT_ID, INT_ID > * ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::table ( void  )
inlineprotected

Accessor of the underlying table.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
size_t ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::total_size ( void  ) const
inline

Return the size of the array that's used to point to the linked lists of ACE_Hash_Map_Entry objects in the hash table.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::trybind ( const EXT_ID &  ext_id,
INT_ID &  int_id 
)
inline

Associate ext_id with int_id if and only if ext_id is not in the map. If ext_id is already in the map then the int_id parameter is assigned the existing value in the map. Returns 0 if a new entry is bound successfully, returns 1 if an attempt is made to bind an existing entry, and returns -1 if failures occur.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::trybind ( const EXT_ID &  ext_id,
INT_ID &  int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
inline

Same as a normal trybind, except the map entry is also passed back to the caller. The entry in this case will either be the newly created entry, or the existing one.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::trybind_i ( const EXT_ID &  ext_id,
INT_ID &  int_id 
)
inlineprotected

Performs trybind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::trybind_i ( const EXT_ID &  ext_id,
INT_ID &  int_id,
ACE_Hash_Map_Entry< EXT_ID, INT_ID > *&  entry 
)
protected

Performs trybind. Must be called with locks held.

template<class EXT_ID, class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind ( const EXT_ID &  ext_id)
inline

Unbind (remove) the ext_id from the map. Don't return the int_id to the caller (this is useful for collections where the int_ids are not dynamically allocated...)

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind ( const EXT_ID &  ext_id,
INT_ID &  int_id 
)
inline

Break any association of ext_id. Returns the value of int_id in case the caller needs to deallocate memory. Return 0 if the unbind was successful, and returns -1 if failures occur.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind ( ACE_Hash_Map_Entry< EXT_ID, INT_ID > *  entry)
inline

Remove entry from map.

This unbind operation is fast relative to those that accept an external ID parameter since no map lookup is performed.

Returns
0 if the unbind was successful, and -1 if failures occur.
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind ( iterator  pos)

Remove entry from map pointed to by iterator pos.

This unbind operation is fast relative to those that accept an external ID parameter since no map lookup is performed.

Returns
0 if the unbind was successful, and -1 if failures occur.
template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind_all ( void  )
inline

Removes all the entries in the ACE_Hash_Map_Manager_Ex.

template<class EXT_ID , class INT_ID , class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind_all_i ( void  )
protected

Removes all the entries in <Map_Manager_Ex>. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind_i ( const EXT_ID &  ext_id,
INT_ID &  int_id 
)
protected

Performs unbind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind_i ( const EXT_ID &  ext_id)
inlineprotected

Performs unbind. Must be called with locks held.

template<class EXT_ID, class INT_ID, class HASH_KEY , class COMPARE_KEYS , class ACE_LOCK >
int ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::unbind_i ( ACE_Hash_Map_Entry< EXT_ID, INT_ID > *  entry)
protected

Performs unbind. Must be called with locks held.

Friends And Related Function Documentation

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
friend class ACE_Hash_Map_Bucket_Iterator< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
friend
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
friend class ACE_Hash_Map_Const_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
friend
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
friend class ACE_Hash_Map_Const_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
friend
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
friend class ACE_Hash_Map_Const_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
friend
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
friend class ACE_Hash_Map_Iterator_Base_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
friend
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
friend class ACE_Hash_Map_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
friend
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
friend class ACE_Hash_Map_Reverse_Iterator_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
friend

Member Data Documentation

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
COMPARE_KEYS ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::compare_keys_
protected

Function object used for comparing keys.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
size_t ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::cur_size_
private

Current number of entries in the table

Note
That this can be larger than <total_size_> due to the bucket chaining).
template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_Allocator* ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::entry_allocator_
protected

Addidtional allocator for entries, so it should be able to allocate 'size' / chunks of sizeof(ACE_Hash_Map_Entry<EXT_ID, INT_ID>) bytes each.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
HASH_KEY ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::hash_key_
protected

Function object used for hashing keys.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_LOCK ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::lock_
mutableprotected

Synchronization variable for the MT_SAFE ACE_Hash_Map_Manager_Ex.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_Hash_Map_Entry<EXT_ID, INT_ID>* ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::table_
private

Array of ACE_Hash_Map_Entry *s, each of which points to an ACE_Hash_Map_Entry that serves as the beginning of a linked list of <EXT_ID>s that hash to that bucket.

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
ACE_Allocator* ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::table_allocator_
protected

Pointer to a memory allocator used for table_, so it should supply size*sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>),

template<class EXT_ID, class INT_ID, class HASH_KEY, class COMPARE_KEYS, class ACE_LOCK>
size_t ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::total_size_
private

Total size of the hash table.


The documentation for this class was generated from the following files: