Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID > Class Template Reference

This class is a thin wrapper around ACE_Hash_Map_Manager, which comes handy when ACE_Hash_Map_Manager is to be used with a non-nil ACE_Allocator. This wrapper insures that the appropriate allocator is in place for every operation that accesses or updates the hash map. More...

#include <Hash_Map_With_Allocator_T.h>

Inheritance diagram for ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >:

Inheritance graph
[legend]
Collaboration diagram for ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_Hash_Map_With_Allocator (ACE_Allocator *alloc)
 Constructor.
 ACE_Hash_Map_With_Allocator (size_t size, ACE_Allocator *alloc)
 Constructor that specifies hash table size.
int bind (const EXT_ID &, const INT_ID &, ACE_Allocator *alloc)
int unbind (const EXT_ID &, INT_ID &, ACE_Allocator *alloc)
int unbind (const EXT_ID &, ACE_Allocator *alloc)
int rebind (const EXT_ID &, const INT_ID &, EXT_ID &, INT_ID &, ACE_Allocator *alloc)
int find (const EXT_ID &, INT_ID &, ACE_Allocator *alloc)
int find (const EXT_ID &, ACE_Allocator *alloc)
 Returns 0 if the <ext_id> is in the mapping, otherwise -1.
int close (ACE_Allocator *alloc)

Detailed Description

template<class EXT_ID, class INT_ID>
class ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >

This class is a thin wrapper around ACE_Hash_Map_Manager, which comes handy when ACE_Hash_Map_Manager is to be used with a non-nil ACE_Allocator. This wrapper insures that the appropriate allocator is in place for every operation that accesses or updates the hash map.

If we use ACE_Hash_Map_Manager with a shared memory allocator (or memory-mapped file allocator, for example), the allocator pointer used by ACE_Hash_Map_Manager gets stored with it, in shared memory (or memory-mapped file). Naturally, this will cause horrible problems, since only the first process to set that pointer will be guaranteed the address of the allocator is meaningful! That is why we need this wrapper, which insures that appropriate allocator pointer is in place for each call.


Constructor & Destructor Documentation

template<class EXT_ID, class INT_ID>
ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::ACE_Hash_Map_With_Allocator ACE_Allocator alloc  ) 
 

Constructor.

template<class EXT_ID, class INT_ID>
ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::ACE_Hash_Map_With_Allocator size_t  size,
ACE_Allocator alloc
 

Constructor that specifies hash table size.


Member Function Documentation

template<class EXT_ID, class INT_ID>
ACE_INLINE int ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::bind const EXT_ID &  ,
const INT_ID &  ,
ACE_Allocator alloc
 

template<class EXT_ID, class INT_ID>
ACE_INLINE int ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::close ACE_Allocator alloc  ) 
 

template<class EXT_ID, class INT_ID>
ACE_INLINE int ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::find const EXT_ID &  ,
ACE_Allocator alloc
 

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

template<class EXT_ID, class INT_ID>
ACE_INLINE int ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::find const EXT_ID &  ,
INT_ID &  ,
ACE_Allocator alloc
 

template<class EXT_ID, class INT_ID>
ACE_INLINE int ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::rebind const EXT_ID &  ,
const INT_ID &  ,
EXT_ID &  ,
INT_ID &  ,
ACE_Allocator alloc
 

template<class EXT_ID, class INT_ID>
ACE_INLINE int ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::unbind const EXT_ID &  ,
ACE_Allocator alloc
 

template<class EXT_ID, class INT_ID>
ACE_INLINE int ACE_Hash_Map_With_Allocator< EXT_ID, INT_ID >::unbind const EXT_ID &  ,
INT_ID &  ,
ACE_Allocator alloc
 


The documentation for this class was generated from the following files:
Generated on Sat Aug 6 03:03:12 2005 for ACE by  doxygen 1.3.9.1