#include <Hash_Map_Manager_T.h>
Inheritance diagram for ACE_Hash_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >:
Public Member Functions | |
ACE_Hash_Map_Manager (ACE_Allocator *table_alloc=0, ACE_Allocator *entry_alloc=0) | |
ACE_Hash_Map_Manager (size_t size, ACE_Allocator *table_alloc=0, ACE_Allocator *entry_alloc=0) | |
int | equal (const EXT_ID &id1, const EXT_ID &id2) |
u_long | hash (const EXT_ID &ext_id) |
This implementation of a map uses a hash table. This class expects that the <EXT_ID> contains a method called <hash>. In addition, the <EXT_ID> must support <operator==>. Both of these constraints can be alleviated via template specialization, as shown in the $ACE_ROOT/tests/Conn_Test.cpp test.
Requirements and Performance Characteristics
Definition at line 1125 of file Hash_Map_Manager_T.h.
ACE_Hash_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Hash_Map_Manager | ( | ACE_Allocator * | table_alloc = 0 , |
|
ACE_Allocator * | entry_alloc = 0 | |||
) |
Initialize a Hash_Map_Manager
with default size elements.
table_alloc | is a pointer to a memory allocator used for table_, so it should supply size*sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>). | |
entry_alloc | is 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 table_alloc is 0 it defaults to ACE_Allocator::instance() . If entry_alloc is 0 then it defaults to the same allocator as table_alloc . |
Definition at line 1146 of file Hash_Map_Manager_T.inl.
01148 : ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> (table_alloc, 01149 entry_alloc) 01150 { 01151 }
ACE_Hash_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Hash_Map_Manager | ( | size_t | size, | |
ACE_Allocator * | table_alloc = 0 , |
|||
ACE_Allocator * | entry_alloc = 0 | |||
) |
Initialize a Hash_Map_Manager
with size
elements.
table_alloc | is a pointer to a memory allocator used for table_, so it should supply size*sizeof (ACE_Hash_Map_Entry<EXT_ID, INT_ID>). | |
entry_alloc | is 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 table_alloc is 0 it defaults to ACE_Allocator::instance() . If entry_alloc is 0 then it defaults to the same allocator as table_alloc . |
Definition at line 1154 of file Hash_Map_Manager_T.inl.
01157 : ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK> (size, 01158 table_alloc, 01159 entry_alloc) 01160 { 01161 }
int ACE_Hash_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::equal | ( | const EXT_ID & | id1, | |
const EXT_ID & | id2 | |||
) |
Returns 1 if <id1> == <id2>, else 0. This is defined as a separate method to facilitate template specialization.
Reimplemented from ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >.
Definition at line 1164 of file Hash_Map_Manager_T.inl.
01165 { 01166 return ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>::equal (id1, id2); 01167 }
u_long ACE_Hash_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::hash | ( | const EXT_ID & | ext_id | ) |
Compute the hash value of the ext_id. This is defined as a separate method to facilitate template specialization.
Reimplemented from ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, ACE_Hash< EXT_ID >, ACE_Equal_To< EXT_ID >, ACE_LOCK >.
Definition at line 1170 of file Hash_Map_Manager_T.inl.
01171 { 01172 return ACE_Hash_Map_Manager_Ex<EXT_ID, INT_ID, ACE_Hash<EXT_ID>, ACE_Equal_To<EXT_ID>, ACE_LOCK>::hash (ext_id); 01173 }