ACE  6.3.3
Public Member Functions | List of all members
ACE_Name_Space_Map< ALLOCATOR > Class Template Reference

This class serves as a Proxy that ensures our process always has the appropriate allocator in place for every operation that accesses or updates the Map Manager. More...

#include <Local_Name_Space_T.h>

Inheritance diagram for ACE_Name_Space_Map< ALLOCATOR >:
Inheritance graph
[legend]
Collaboration diagram for ACE_Name_Space_Map< ALLOCATOR >:
Collaboration graph
[legend]

Public Member Functions

 ACE_Name_Space_Map (ALLOCATOR *alloc)
 Constructor. More...
 
int bind (const ACE_NS_String &, const ACE_NS_Internal &, ALLOCATOR *alloc)
 
int unbind (const ACE_NS_String &, ACE_NS_Internal &, ALLOCATOR *alloc)
 
int rebind (const ACE_NS_String &, const ACE_NS_Internal &, ACE_NS_String &, ACE_NS_Internal &, ALLOCATOR *alloc)
 
int find (const ACE_NS_String &, ACE_NS_Internal &, ALLOCATOR *alloc)
 
int close (ALLOCATOR *alloc)
 
- Public Member Functions inherited from 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)
 
 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
 

Additional Inherited Members

- Public Types inherited from ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
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
 
- Protected Member Functions inherited from ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
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 inherited from ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >
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...
 

Detailed Description

template<class ALLOCATOR>
class ACE_Name_Space_Map< ALLOCATOR >

This class serves as a Proxy that ensures our process always has the appropriate allocator in place for every operation that accesses or updates the Map Manager.

We need this class because otherwise the ALLOCATOR pointer will be stored in the Map_Manager that resides within shared memory. 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!

Constructor & Destructor Documentation

template<class ALLOCATOR>
ACE_Name_Space_Map< ALLOCATOR >::ACE_Name_Space_Map ( ALLOCATOR *  alloc)

Constructor.

Member Function Documentation

template<class ALLOCATOR>
int ACE_Name_Space_Map< ALLOCATOR >::bind ( const ACE_NS_String ext_id,
const ACE_NS_Internal int_id,
ALLOCATOR *  alloc 
)
template<class ALLOCATOR>
int ACE_Name_Space_Map< ALLOCATOR >::close ( ALLOCATOR *  alloc)
template<class ALLOCATOR>
int ACE_Name_Space_Map< ALLOCATOR >::find ( const ACE_NS_String ext_id,
ACE_NS_Internal int_id,
ALLOCATOR *  alloc 
)
template<class ALLOCATOR>
int ACE_Name_Space_Map< ALLOCATOR >::rebind ( const ACE_NS_String ext_id,
const ACE_NS_Internal int_id,
ACE_NS_String old_ext_id,
ACE_NS_Internal old_int_id,
ALLOCATOR *  alloc 
)
template<class ALLOCATOR>
int ACE_Name_Space_Map< ALLOCATOR >::unbind ( const ACE_NS_String ext_id,
ACE_NS_Internal int_id,
ALLOCATOR *  alloc 
)

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