Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
ACE_Hash_Map_Manager Class Template Reference
Wrapper for backward compatibility.
More...
#include <Hash_Map_Manager_T.h>
Inheritance diagram for ACE_Hash_Map_Manager:
[legend]Collaboration diagram for ACE_Hash_Map_Manager:
[legend]List of all members.
Public Methods |
| ACE_Hash_Map_Manager (ACE_Allocator *alloc=0) |
| Initialize a <Hash_Map_Manager> with default size. More...
|
| ACE_Hash_Map_Manager (size_t size, ACE_Allocator *alloc=0) |
| Initialize a <Hash_Map_Manager> with size <length>. More...
|
int | 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. More...
|
u_long | 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. More...
|
Detailed Description
template<class EXT_ID, class INT_ID, class ACE_LOCK>
class ACE_Hash_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >
Wrapper for backward compatibility.
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
- Internal Structure Hash Table
- Duplicates allowed? No
- Random access allowed? Yes
- Search speed O(1)
- Insert/replace speed O(1), can be longer if the hash map has to resize
- Iterator still valid after change to container? Yes
- Frees memory for removed elements? Yes
- Items inserted by Value
- Requirements for key type
- Default constructor
- Copy constructor
- operator=
- operator==
- Requirements for object type
- Default constructor
- Copy constructor
- operator=
- operator<
Constructor & Destructor Documentation
template<class EXT_ID, class INT_ID, class ACE_LOCK> |
ACE_Hash_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Hash_Map_Manager |
( |
ACE_Allocator * |
alloc = 0 |
) |
|
|
|
Initialize a <Hash_Map_Manager> with default size.
|
template<class EXT_ID, class INT_ID, class ACE_LOCK> |
ACE_Hash_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Hash_Map_Manager |
( |
size_t |
size, |
|
|
ACE_Allocator * |
alloc = 0 |
|
) |
|
|
|
Initialize a <Hash_Map_Manager> with size <length>.
|
Member Function Documentation
template<class EXT_ID, class INT_ID, class ACE_LOCK> |
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. |
template<class EXT_ID, class INT_ID, class ACE_LOCK> |
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. |
The documentation for this class was generated from the following files:
Generated on Sun Dec 1 11:23:11 2002 for ACE by
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001