ACE 8.0.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK > Class Template Reference

Define a map abstraction that associates EXT_IDs with INT_IDs. More...

#include <Map_Manager.h>

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

Public Types

typedef EXT_ID KEY
 
typedef INT_ID VALUE
 
typedef ACE_LOCK lock_type
 
typedef ACE_Map_Entry< EXT_ID, INT_IDENTRY
 
typedef ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > ITERATOR
 
typedef ACE_Map_Const_Iterator< EXT_ID, INT_ID, ACE_LOCK > CONST_ITERATOR
 
typedef ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > REVERSE_ITERATOR
 
typedef ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > iterator
 
typedef ACE_Map_Const_Iterator< EXT_ID, INT_ID, ACE_LOCK > const_iterator
 
typedef ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > reverse_iterator
 

Public Member Functions

 ACE_Map_Manager (ACE_Allocator *alloc=nullptr)
 Initialize a ACE_Map_Manager with the ACE_DEFAULT_MAP_SIZE.
 
 ACE_Map_Manager (size_t size, ACE_Allocator *alloc=nullptr)
 Initialize a ACE_Map_Manager with size entries.
 
int open (size_t length=ACE_DEFAULT_MAP_SIZE, ACE_Allocator *alloc=nullptr)
 Initialize a ACE_Map_Manager with size length.
 
int close ()
 
 ~ACE_Map_Manager ()
 
int bind (const EXT_ID &ext_id, const INT_ID &int_id)
 
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, INT_ID &old_int_id)
 
int rebind (const EXT_ID &ext_id, const INT_ID &int_id)
 
int trybind (const EXT_ID &ext_id, INT_ID &int_id)
 
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.
 
int unbind (const EXT_ID &ext_id)
 
int unbind (const EXT_ID &ext_id, INT_ID &int_id)
 
void unbind_all ()
 
size_t current_size () const
 Return the current size of the map.
 
size_t total_size () const
 Return the total size of the map.
 
ACE_LOCK & mutex ()
 
void dump () const
 Dump the state of an object.
 
ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > begin ()
 Return forward iterator.
 
ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > end ()
 
ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > rbegin ()
 Return reverse iterator.
 
ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > rend ()
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
 

Protected Types

enum  { MAX_EXPONENTIAL = 64 * 1024 , LINEAR_INCREASE = 32 * 1024 }
 

Protected Member Functions

int bind_i (const EXT_ID &ext_id, const INT_ID &int_id)
 
int shared_bind (const EXT_ID &ext_id, const INT_ID &int_id)
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, EXT_ID &old_ext_id, INT_ID &old_int_id)
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id)
 
int rebind_i (const EXT_ID &ext_id, const INT_ID &int_id)
 
int trybind_i (const EXT_ID &ext_id, INT_ID &int_id)
 
int find_i (const EXT_ID &ext_id, INT_ID &int_id)
 
int find_and_return_index (const EXT_ID &ext_id, ACE_UINT32 &slot)
 
int unbind_i (const EXT_ID &ext_id, INT_ID &int_id)
 
int unbind_i (const EXT_ID &ext_id)
 
int unbind_and_return_index (const EXT_ID &ext_id, ACE_UINT32 &slot)
 
void unbind_slot (ACE_UINT32 slot)
 Unbind slot.
 
int resize_i (ACE_UINT32 size)
 Resize the map. Must be called with locks held.
 
int close_i ()
 Close down a <Map_Manager>. Must be called with locks held.
 
int equal (const EXT_ID &id1, const EXT_ID &id2)
 
ACE_UINT32 new_size ()
 
void free_search_structure ()
 
ACE_UINT32 free_list_id () const
 Id of the free list sentinel.
 
ACE_UINT32 occupied_list_id () const
 Id of the occupied list sentinel.
 
int next_free (ACE_UINT32 &slot)
 Finds the next free slot.
 
void move_from_free_list_to_occupied_list (ACE_UINT32 slot)
 Move from free list to occupied list.
 
void move_from_occupied_list_to_free_list (ACE_UINT32 slot)
 Move from occupied list to free list.
 
void shared_move (ACE_UINT32 slot, ACE_Map_Entry< EXT_ID, INT_ID > &current_list, ACE_UINT32 current_list_id, ACE_Map_Entry< EXT_ID, INT_ID > &new_list, ACE_UINT32 new_list_id)
 Move helper.
 

Protected Attributes

ACE_Allocatorallocator_
 Pointer to a memory allocator.
 
ACE_LOCK lock_
 Synchronization variable for the MT_SAFE ACE_Map_Manager.
 
ACE_Map_Entry< EXT_ID, INT_ID > * search_structure_
 Implement the Map as a resizeable array of ACE_Map_Entry.
 
ACE_UINT32 total_size_
 Total number of elements in this->search_structure_.
 
ACE_UINT32 cur_size_
 Current size of the map.
 
ACE_Map_Entry< EXT_ID, INT_IDfree_list_
 Free list.
 
ACE_Map_Entry< EXT_ID, INT_IDoccupied_list_
 Occupied list.
 

Private Member Functions

void operator= (const ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK > &)=delete
 
 ACE_Map_Manager (const ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK > &)=delete
 

Friends

class ACE_Map_Iterator_Base< EXT_ID, INT_ID, ACE_LOCK >
 
class ACE_Map_Const_Iterator_Base< EXT_ID, INT_ID, ACE_LOCK >
 
class ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >
 
class ACE_Map_Const_Iterator< EXT_ID, INT_ID, ACE_LOCK >
 
class ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK >
 

Detailed Description

template<class EXT_ID, class INT_ID, class ACE_LOCK>
class ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >

Define a map abstraction that associates EXT_IDs with INT_IDs.

The EXT_ID must support operator==. This constraint can be alleviated via template specialization, as shown in the $ACE_ROOT/tests/Conn_Test.cpp test. This class uses an ACE_Allocator to allocate memory. The user can make this a persistant class by providing an ACE_Allocator with a persistable memory pool. This implementation of a map uses an array, which is searched linearly. For more efficient searching you should use the ACE_Hash_Map_Manager.

Member Typedef Documentation

◆ CONST_ITERATOR

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef ACE_Map_Const_Iterator<EXT_ID, INT_ID, ACE_LOCK> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::CONST_ITERATOR

◆ const_iterator

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef ACE_Map_Const_Iterator<EXT_ID, INT_ID, ACE_LOCK> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::const_iterator

◆ ENTRY

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef ACE_Map_Entry<EXT_ID, INT_ID> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ENTRY

◆ ITERATOR

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ITERATOR

◆ iterator

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef ACE_Map_Iterator<EXT_ID, INT_ID, ACE_LOCK> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::iterator

◆ KEY

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef EXT_ID ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::KEY

◆ lock_type

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef ACE_LOCK ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::lock_type

◆ REVERSE_ITERATOR

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::REVERSE_ITERATOR

◆ reverse_iterator

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef ACE_Map_Reverse_Iterator<EXT_ID, INT_ID, ACE_LOCK> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::reverse_iterator

◆ VALUE

template<class EXT_ID , class INT_ID , class ACE_LOCK >
typedef INT_ID ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::VALUE

Member Enumeration Documentation

◆ anonymous enum

template<class EXT_ID , class INT_ID , class ACE_LOCK >
anonymous enum
protected
Enumerator
MAX_EXPONENTIAL 

Grow map exponentially up to 64K.

LINEAR_INCREASE 

Afterwards grow in chunks of 32K.

Constructor & Destructor Documentation

◆ ACE_Map_Manager() [1/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Map_Manager ( ACE_Allocator * alloc = nullptr)
inline

Initialize a ACE_Map_Manager with the ACE_DEFAULT_MAP_SIZE.

◆ ACE_Map_Manager() [2/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Map_Manager ( size_t size,
ACE_Allocator * alloc = nullptr )
inline

Initialize a ACE_Map_Manager with size entries.

◆ ~ACE_Map_Manager()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::~ACE_Map_Manager ( )
inline

Close down a ACE_Map_Manager and release dynamically allocated resources.

◆ ACE_Map_Manager() [3/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Map_Manager ( const ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK > & )
privatedelete

Member Function Documentation

◆ begin()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::begin ( )
inline

Return forward iterator.

◆ bind()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::bind ( const EXT_ID & ext_id,
const INT_ID & int_id )
inline

Associate ext_id with int_id. If ext_id is already in the map then the ACE_Map_Entry is not changed.

Return values
0If a new entry is bound successfully.
1If an attempt is made to bind an existing entry.
-1If failures occur.

◆ bind_i()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::bind_i ( const EXT_ID & ext_id,
const INT_ID & int_id )
protected

Performs the binding of ext_id to int_id. Must be called with locks held.

◆ close()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::close ( )
inline

Close down a ACE_Map_Manager and release dynamically allocated resources.

◆ close_i()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::close_i ( )
protected

Close down a <Map_Manager>. Must be called with locks held.

◆ current_size()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
size_t ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::current_size ( ) const
inline

Return the current size of the map.

◆ dump()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::dump ( ) const

Dump the state of an object.

◆ end()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::end ( )
inline

◆ equal()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::equal ( const EXT_ID & id1,
const EXT_ID & id2 )
inlineprotected

Returns 1 if <id1> == <id2>, else 0. This is defined as a separate method to facilitate template specialization.

◆ find() [1/2]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::find ( const EXT_ID & ext_id) const
inline

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

◆ find() [2/2]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::find ( const EXT_ID & ext_id,
INT_ID & int_id ) const
inline

Locate ext_id and pass out parameter via int_id.

Return values
0If found.
-1If not found.

◆ find_and_return_index()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::find_and_return_index ( const EXT_ID & ext_id,
ACE_UINT32 & slot )
protected

Performs a find using ext_id as the key. Must be called with locks held.

◆ find_i()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::find_i ( const EXT_ID & ext_id,
INT_ID & int_id )
protected

Performs a find of int_id using ext_id as the key. Must be called with locks held.

◆ free_list_id()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_UINT32 ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::free_list_id ( ) const
inlineprotected

Id of the free list sentinel.

◆ free_search_structure()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::free_search_structure ( )
protected

Explicitly call the destructors and free up the <search_structure_>.

◆ move_from_free_list_to_occupied_list()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::move_from_free_list_to_occupied_list ( ACE_UINT32 slot)
inlineprotected

Move from free list to occupied list.

◆ move_from_occupied_list_to_free_list()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::move_from_occupied_list_to_free_list ( ACE_UINT32 slot)
inlineprotected

Move from occupied list to free list.

◆ mutex()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_LOCK & ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::mutex ( )
inline

Returns a reference to the underlying ACE_LOCK. This makes it possible to acquire the lock explicitly, which can be useful in some cases if you instantiate the ACE_Atomic_Op with an ACE_Recursive_Mutex or ACE_Process_Mutex, or if you need to guard the state of an iterator.

Note
The right name would be lock, but HP/C++ will choke on that!

◆ new_size()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_UINT32 ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::new_size ( )
protected

This function returns the new size of the Map Manager. This function is called when we run out of room and need to resize.

◆ next_free()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::next_free ( ACE_UINT32 & slot)
protected

Finds the next free slot.

◆ occupied_list_id()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_UINT32 ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::occupied_list_id ( ) const
inlineprotected

Id of the occupied list sentinel.

◆ open()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
class ACE_LOCK int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::open ( size_t length = ACE_DEFAULT_MAP_SIZE,
ACE_Allocator * alloc = nullptr )

Initialize a ACE_Map_Manager with size length.

◆ operator=()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::operator= ( const ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK > & )
privatedelete

◆ rbegin()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rbegin ( )
inline

Return reverse iterator.

◆ rebind() [1/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rebind ( const EXT_ID & ext_id,
const INT_ID & int_id )
inline

Reassociate ext_id with int_id. Old values in the map are ignored.

◆ rebind() [2/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rebind ( const EXT_ID & ext_id,
const INT_ID & int_id,
EXT_ID & old_ext_id,
INT_ID & old_int_id )
inline

Reassociate ext_id with int_id. If ext_id is not in the map then behaves just like bind(). Otherwise, store the old values of ext_id and int_id into the "out" parameters and rebind the new parameters. This is very useful if you need to have an atomic way of updating <Map_Entries> and you also need full control over memory allocation.

Return values
0If a new entry is bound successfully.
1If an existing entry was rebound.
-1If failures occur.

◆ rebind() [3/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rebind ( const EXT_ID & ext_id,
const INT_ID & int_id,
INT_ID & old_int_id )
inline

Reassociate ext_id with int_id. If ext_id is not in the map then behaves just like bind(). Otherwise, store the old values of int_id into the "out" parameter and rebind the new parameters.

Return values
0If a new entry is bound successfully.
1If an existing entry was rebound.
-1If failures occur.

◆ rebind_i() [1/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rebind_i ( const EXT_ID & ext_id,
const INT_ID & int_id )
protected

Performs a rebinding of <ext_it> to int_id. Must be called with locks held.

◆ rebind_i() [2/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rebind_i ( const EXT_ID & ext_id,
const INT_ID & int_id,
EXT_ID & old_ext_id,
INT_ID & old_int_id )
protected

Performs a rebinding of <ext_it> to int_id. Also, recovers old values. Must be called with locks held.

◆ rebind_i() [3/3]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rebind_i ( const EXT_ID & ext_id,
const INT_ID & int_id,
INT_ID & old_int_id )
protected

Performs a rebinding of <ext_it> to int_id. Also, recovers old values. Must be called with locks held.

◆ rend()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rend ( )
inline

◆ resize_i()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::resize_i ( ACE_UINT32 size)
protected

Resize the map. Must be called with locks held.

◆ shared_bind()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::shared_bind ( const EXT_ID & ext_id,
const INT_ID & int_id )
protected

Bind an entry (without finding first). Must be called with locks held.

◆ shared_move()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::shared_move ( ACE_UINT32 slot,
ACE_Map_Entry< EXT_ID, INT_ID > & current_list,
ACE_UINT32 current_list_id,
ACE_Map_Entry< EXT_ID, INT_ID > & new_list,
ACE_UINT32 new_list_id )
protected

Move helper.

◆ total_size()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
size_t ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::total_size ( ) const
inline

Return the total size of the map.

◆ trybind()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::trybind ( const EXT_ID & ext_id,
INT_ID & int_id )
inline

Associate ext_id with int_id if and only if ext_id is not in the map. If ext_id is already in the map then the int_id parameter is overwritten with the existing value in the map

Return values
0If a new entry is bound successfully.
1If an attempt is made to bind an existing entry.
-1If failures occur.

◆ trybind_i()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::trybind_i ( const EXT_ID & ext_id,
INT_ID & int_id )
protected

Performs a conditional bind of int_id using ext_id as the key. Must be called with locks held.

◆ unbind() [1/2]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::unbind ( const EXT_ID & ext_id)
inline

Unbind (remove) the ext_id from the map. Don't return the int_id to the caller (this is useful for collections where the int_ids are not dynamically allocated...) Returns 0 if successful, else -1.

◆ unbind() [2/2]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::unbind ( const EXT_ID & ext_id,
INT_ID & int_id )
inline

Break any association of ext_id. Returns the value of int_id in case the caller needs to deallocate memory. Returns 0 if successful, else -1.

◆ unbind_all()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::unbind_all ( )

Unbind all entires.

◆ unbind_and_return_index()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::unbind_and_return_index ( const EXT_ID & ext_id,
ACE_UINT32 & slot )
protected

Performs an unbind using ext_id as the key. Must be called with locks held.

◆ unbind_i() [1/2]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::unbind_i ( const EXT_ID & ext_id)
inlineprotected

Performs an unbind using ext_id as the key. Must be called with locks held.

◆ unbind_i() [2/2]

template<class EXT_ID , class INT_ID , class ACE_LOCK >
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::unbind_i ( const EXT_ID & ext_id,
INT_ID & int_id )
protected

Performs an unbind of int_id using ext_id as the key. Must be called with locks held.

◆ unbind_slot()

template<class EXT_ID , class INT_ID , class ACE_LOCK >
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::unbind_slot ( ACE_UINT32 slot)
protected

Unbind slot.

Friends And Related Symbol Documentation

◆ ACE_Map_Const_Iterator< EXT_ID, INT_ID, ACE_LOCK >

template<class EXT_ID , class INT_ID , class ACE_LOCK >
friend class ACE_Map_Const_Iterator< EXT_ID, INT_ID, ACE_LOCK >
friend

◆ ACE_Map_Const_Iterator_Base< EXT_ID, INT_ID, ACE_LOCK >

template<class EXT_ID , class INT_ID , class ACE_LOCK >
friend class ACE_Map_Const_Iterator_Base< EXT_ID, INT_ID, ACE_LOCK >
friend

◆ ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >

template<class EXT_ID , class INT_ID , class ACE_LOCK >
friend class ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >
friend

◆ ACE_Map_Iterator_Base< EXT_ID, INT_ID, ACE_LOCK >

template<class EXT_ID , class INT_ID , class ACE_LOCK >
friend class ACE_Map_Iterator_Base< EXT_ID, INT_ID, ACE_LOCK >
friend

◆ ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK >

template<class EXT_ID , class INT_ID , class ACE_LOCK >
friend class ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK >
friend

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

◆ allocator_

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Allocator* ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::allocator_
protected

Pointer to a memory allocator.

◆ cur_size_

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_UINT32 ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::cur_size_
protected

Current size of the map.

◆ free_list_

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Entry<EXT_ID, INT_ID> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::free_list_
protected

Free list.

◆ lock_

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_LOCK ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::lock_
mutableprotected

Synchronization variable for the MT_SAFE ACE_Map_Manager.

◆ occupied_list_

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Entry<EXT_ID, INT_ID> ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::occupied_list_
protected

Occupied list.

◆ search_structure_

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_Map_Entry<EXT_ID, INT_ID>* ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::search_structure_
protected

Implement the Map as a resizeable array of ACE_Map_Entry.

◆ total_size_

template<class EXT_ID , class INT_ID , class ACE_LOCK >
ACE_UINT32 ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::total_size_
protected

Total number of elements in this->search_structure_.


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