ACE 8.0.5
Loading...
Searching...
No Matches
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 >:
Collaboration diagram for ACE_Name_Space_Map< ALLOCATOR >:

Public Member Functions

 ACE_Name_Space_Map (ALLOCATOR *alloc)
 Constructor.
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< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutex >
 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 ()
int unbind_all ()
 Removes all the entries in the ACE_Hash_Map_Manager_Ex.
 ~ACE_Hash_Map_Manager_Ex ()
 Cleanup the ACE_Hash_Map_Manager_Ex.
int bind (const ACE_NS_String &item, const ACE_NS_Internal &int_id)
int bind (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
int trybind (const ACE_NS_String &ext_id, ACE_NS_Internal &int_id)
int trybind (const ACE_NS_String &ext_id, ACE_NS_Internal &int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
int rebind (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id)
int rebind (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
int rebind (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_NS_Internal &old_int_id)
int rebind (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_NS_Internal &old_int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
int 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)
int 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, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
int find (const ACE_NS_String &ext_id, ACE_NS_Internal &int_id) const
int find (const ACE_NS_String &ext_id) const
 Returns 0 if the ext_id is in the mapping, otherwise -1.
int find (const ACE_NS_String &ext_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry) const
void find (ACE_NS_String const &ext_id, iterator &pos) const
int unbind (const ACE_NS_String &ext_id)
int unbind (const ACE_NS_String &ext_id, ACE_NS_Internal &int_id)
int unbind (ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *entry)
 Remove entry from map.
int unbind (iterator pos)
 Remove entry from map pointed to by iterator pos.
size_t current_size () const
size_t total_size () const
ACE_Null_Mutexmutex ()
void dump () const
 Dump the state of an object.
iterator begin ()
 Return forward iterator.
iterator end ()
const_iterator begin () const
const_iterator end () const
reverse_iterator rbegin ()
 Return reverse iterator.
reverse_iterator rend ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const

Additional Inherited Members

Public Types inherited from ACE_Hash_Map_Manager_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutex >
typedef ACE_NS_String KEY
typedef ACE_NS_Internal VALUE
typedef ACE_Null_Mutex lock_type
typedef ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_InternalENTRY
typedef ACE_Hash_Map_Iterator_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_MutexITERATOR
typedef ACE_Hash_Map_Const_Iterator_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_MutexCONST_ITERATOR
typedef ACE_Hash_Map_Reverse_Iterator_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_MutexREVERSE_ITERATOR
typedef ACE_Hash_Map_Const_Reverse_Iterator_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_MutexCONST_REVERSE_ITERATOR
typedef ACE_Hash_Map_Iterator_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutexiterator
typedef ACE_Hash_Map_Const_Iterator_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutexconst_iterator
typedef ACE_Hash_Map_Reverse_Iterator_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutexreverse_iterator
typedef ACE_Hash_Map_Const_Reverse_Iterator_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutexconst_reverse_iterator
typedef ACE_NS_String key_type
typedef ACE_NS_Internal data_type
typedef ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internalvalue_type
typedef value_typereference
typedef value_type constconst_reference
typedef value_typepointer
typedef value_type constconst_pointer
typedef ptrdiff_t difference_type
typedef size_t size_type
Public Attributes inherited from ACE_Hash_Map_Manager_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutex >
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
Protected Member Functions inherited from ACE_Hash_Map_Manager_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutex >
int equal (const ACE_NS_String &id1, const ACE_NS_String &id2)
u_long hash (const ACE_NS_String &ext_id)
int bind_i (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id)
 Performs bind. Must be called with locks held.
int bind_i (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
 Performs bind. Must be called with locks held.
int trybind_i (const ACE_NS_String &ext_id, ACE_NS_Internal &int_id)
 Performs trybind. Must be called with locks held.
int trybind_i (const ACE_NS_String &ext_id, ACE_NS_Internal &int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
 Performs trybind. Must be called with locks held.
int rebind_i (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id)
 Performs rebind. Must be called with locks held.
int rebind_i (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
 Performs rebind. Must be called with locks held.
int rebind_i (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_NS_Internal &old_int_id)
 Performs rebind. Must be called with locks held.
int rebind_i (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_NS_Internal &old_int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
 Performs rebind. Must be called with locks held.
int rebind_i (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_NS_String &old_ext_id, ACE_NS_Internal &old_int_id)
 Performs rebind. Must be called with locks held.
int rebind_i (const ACE_NS_String &ext_id, const ACE_NS_Internal &int_id, ACE_NS_String &old_ext_id, ACE_NS_Internal &old_int_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
 Performs rebind. Must be called with locks held.
int find_i (const ACE_NS_String &ext_id, ACE_NS_Internal &int_id)
int find_i (const ACE_NS_String &ext_id)
int find_i (const ACE_NS_String &ext_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry)
int unbind_i (const ACE_NS_String &ext_id, ACE_NS_Internal &int_id)
 Performs unbind. Must be called with locks held.
int unbind_i (const ACE_NS_String &ext_id)
 Performs unbind. Must be called with locks held.
int unbind_i (ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *entry)
 Performs unbind. Must be called with locks held.
int create_buckets (size_t size)
int close_i ()
int unbind_all_i ()
int shared_find (const ACE_NS_String &ext_id, ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > *&entry, size_t &loc)
 Returns the ACE_Hash_Map_Entry that corresponds to ext_id.
ACE_Hash_Map_Entry< ACE_NS_String, ACE_NS_Internal > * table ()
 Accessor of the underlying table.
Protected Attributes inherited from ACE_Hash_Map_Manager_Ex< ACE_NS_String, ACE_NS_Internal, ACE_Hash< ACE_NS_String >, ACE_Equal_To< ACE_NS_String >, ACE_Null_Mutex >
ACE_Allocatortable_allocator_
ACE_Allocatorentry_allocator_
ACE_Null_Mutex lock_
ACE_Hash< ACE_NS_Stringhash_key_
 Function object used for hashing keys.
ACE_Equal_To< ACE_NS_Stringcompare_keys_
 Function object used for comparing keys.

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

◆ ACE_Name_Space_Map()

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

Constructor.

Member Function Documentation

◆ bind()

template<class ALLOCATOR>
int ACE_Name_Space_Map< ALLOCATOR >::bind ( const ACE_NS_String & ext_id,
const ACE_NS_Internal & int_id,
ALLOCATOR * alloc )

◆ close()

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

◆ find()

template<class ALLOCATOR>
int ACE_Name_Space_Map< ALLOCATOR >::find ( const ACE_NS_String & ext_id,
ACE_NS_Internal & int_id,
ALLOCATOR * alloc )

◆ rebind()

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 )

◆ unbind()

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: