Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Map_Manager Class Template Reference

Define a map abstraction that associates <EXT_ID>s with <INT_ID>s. More...

`#include <Map_Manager.h>`

Inheritance diagram for ACE_Map_Manager:

[legend]
Collaboration diagram for ACE_Map_Manager:

[legend]
List of all members.

## Public Types
typedef EXT_ID | KEY
typedef INT_ID | VALUE
typedef ACE_Map_Entry< EXT_ID, INT_ID > | ENTRY
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 Methods
| ACE_Map_Manager (ACE_Allocator *alloc=0)
| Initialize a <Map_Manager> with the <ACE_DEFAULT_MAP_SIZE>. More...
| ACE_Map_Manager (size_t size, ACE_Allocator *alloc=0)
| Initialize a <Map_Manager> with <size> entries. More...
int | open (size_t length=ACE_DEFAULT_MAP_SIZE, ACE_Allocator *alloc=0)
| Initialize a <Map_Manager> with size <length>. More...
int | close (void)
| Close down a <Map_Manager> and release dynamically allocated resources. More...
| ~ACE_Map_Manager (void)
| Close down a <Map_Manager> and release dynamically allocated resources. More...
int | bind (const EXT_ID &ext_id, const INT_ID &int_id)
| Associate <ext_id> with <int_id>. More...
int | rebind (const EXT_ID &ext_id, const INT_ID &int_id, EXT_ID &old_ext_id, INT_ID &old_int_id)
| Reassociate <ext_id> with <int_id>. More...
int | rebind (const EXT_ID &ext_id, const INT_ID &int_id, INT_ID &old_int_id)
| Reassociate <ext_id> with <int_id>. More...
int | rebind (const EXT_ID &ext_id, const INT_ID &int_id)
| Reassociate <ext_id> with <int_id>. Old values in the map are ignored. More...
int | trybind (const EXT_ID &ext_id, INT_ID &int_id)
| Associate <ext_id> with <int_id> if and only if <ext_id> is not in the map. More...
int | find (const EXT_ID &ext_id, INT_ID &int_id) const
| Locate <ext_id> and pass out parameter via <int_id>. Returns 0 if found, returns -1 if not found. More...
int | find (const EXT_ID &ext_id) const
| Returns 0 if the <ext_id> is in the mapping, otherwise -1. More...
int | unbind (const EXT_ID &ext_id)
| Unbind (remove) the <ext_id> from the map. More...
int | unbind (const EXT_ID &ext_id, INT_ID &int_id)
| Break any association of <ext_id>. More...
void | unbind_all (void)
| Unbind all entires. More...
size_t | current_size (void) const
| Return the current size of the map. More...
size_t | total_size (void) const
| Return the total size of the map. More...
ACE_LOCK & | mutex (void)
| Returns a reference to the underlying <ACE_LOCK>. More...
void | dump (void) const
| Dump the state of an object. More...
ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > | begin (void)
| Return forward iterator. More...
ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > | end (void)
ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > | rbegin (void)
| Return reverse iterator. More...
ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > | rend (void)
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks. More...
## Protected Types
enum | { MAX_EXPONENTIAL = 64 * 1024, LINEAR_INCREASE = 32 * 1024 }
## Protected Methods
int | bind_i (const EXT_ID &ext_id, const INT_ID &int_id)
| Performs the binding of <ext_id> to <int_id>. Must be called with locks held. More...
int | shared_bind (const EXT_ID &ext_id, const INT_ID &int_id)
| Bind an entry (without finding first). 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 a rebinding of <ext_it> to <int_id>. Also, recovers old values. 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 a rebinding of <ext_it> to <int_id>. Also, recovers old values. Must be called with locks held. More...
int | rebind_i (const EXT_ID &ext_id, const INT_ID &int_id)
| Performs a rebinding of <ext_it> to <int_id>. Must be called with locks held. More...
int | trybind_i (const EXT_ID &ext_id, INT_ID &int_id)
| Performs a conditional bind of <int_id> using <ext_id> as the key. Must be called with locks held. More...
int | find_i (const EXT_ID &ext_id, INT_ID &int_id)
| Performs a find of <int_id> using <ext_id> as the key. Must be called with locks held. More...
int | find_and_return_index (const EXT_ID &ext_id, ACE_UINT32 &slot)
| Performs a find using <ext_id> as the key. Must be called with locks held. More...
int | unbind_i (const EXT_ID &ext_id, INT_ID &int_id)
| Performs an unbind of <int_id> using <ext_id> as the key. Must be called with locks held. More...
int | unbind_i (const EXT_ID &ext_id)
| Performs an unbind using <ext_id> as the key. Must be called with locks held. More...
int | unbind_and_return_index (const EXT_ID &ext_id, ACE_UINT32 &slot)
| Performs an unbind using <ext_id> as the key. Must be called with locks held. More...
void | unbind_slot (ACE_UINT32 slot)
| Unbind <slot>. More...
int | resize_i (ACE_UINT32 size)
| Resize the map. Must be called with locks held. More...
int | close_i (void)
| Close down a <Map_Manager>. Must be called with locks held. 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...
ACE_UINT32 | new_size (void)
| This function returns the new size of the Map Manager. This function is called when we run out of room and need to resize. More...
void | free_search_structure (void)
| Explicitly call the destructors and free up the <search_structure_>. More...
ACE_UINT32 | free_list_id (void) const
| Id of the free list sentinel. More...
ACE_UINT32 | occupied_list_id (void) const
| Id of the occupied list sentinel. More...
int | next_free (ACE_UINT32 &slot)
| Finds the next free slot. More...
void | move_from_free_list_to_occupied_list (ACE_UINT32 slot)
| Move from free list to occupied list. More...
void | move_from_occupied_list_to_free_list (ACE_UINT32 slot)
| Move from occupied list to free list. More...
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. More...
## Protected Attributes
ACE_Allocator * | allocator_
| Pointer to a memory allocator. More...
ACE_LOCK | lock_
| Synchronization variable for the MT_SAFE <ACE_Map_Manager>. More...
ACE_Map_Entry< EXT_ID, INT_ID > * | search_structure_
| Implement the Map as a resizeable array of <ACE_Map_Entry>. More...
ACE_UINT32 | total_size_
| Total number of elements in this->search_structure_. More...
ACE_UINT32 | cur_size_
| Current size of the map. More...
ACE_Map_Entry< EXT_ID, INT_ID > | free_list_
| Free list. More...
ACE_Map_Entry< EXT_ID, INT_ID > | occupied_list_
| Occupied list. More...
## Private Methods
void | operator= (const ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK > &)
| ACE_Map_Manager (const ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK > &)
## 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_ID>s with <INT_ID>s.

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

template<class EXT_ID, class INT_ID, class ACE_LOCK>
typedef ACE_Map_Const_Iterator<EXT_ID, INT_ID, ACE_LOCK> ACE_Map_Manager::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::CONST_ITERATOR

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

| Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

| Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

| Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

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

| Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

| Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

## Member Enumeration Documentation

template<class EXT_ID, class INT_ID, class ACE_LOCK>
anonymous enum`[protected]`

  | Enumeration values:
  MAX_EXPONENTIAL | Grow map exponentially up to 64K.
  LINEAR_INCREASE | Afterwards grow in chunks of 32K.

## Constructor & Destructor Documentation

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Map_Manager | ( | ACE_Allocator * | alloc = 0 | ) |

| Initialize a <Map_Manager> with the <ACE_DEFAULT_MAP_SIZE>.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::ACE_Map_Manager | ( | size_t | size,
|  | ACE_Allocator * | alloc = 0
| ) |

| Initialize a <Map_Manager> with <size> entries.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::~ACE_Map_Manager | ( | void |  | ) |

| Close down a <Map_Manager> and release dynamically allocated resources.

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 > & |  | ) | `[private]`

## Member Function Documentation

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::begin | ( | void |  | ) |

| Return forward iterator. Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

| Associate <ext_id> with <int_id>. If <ext_id> is already in the map then the <Map_Entry> is not changed. Returns 0 if a new entry is bound successfully, returns 1 if an attempt is made to bind an existing entry, and returns -1 if failures occur.

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.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::close | ( | void |  | ) |

| Close down a <Map_Manager> and release dynamically allocated resources. Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::close_i | ( | void |  | ) | `[protected]`

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

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE size_t ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::current_size | ( | void |  | ) | const

| Return the current size of the map. Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

| Dump the state of an object. Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK > ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::end | ( | void |  | ) |

| Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::equal | ( | const EXT_ID & | id1,
|  | const EXT_ID & | id2
| ) | `[protected]`

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

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

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

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

| Locate <ext_id> and pass out parameter via <int_id>. Returns 0 if found, returns -1 if not found.

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.

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.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_UINT32 ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::free_list_id | ( | void |  | ) | const`[protected]`

| Id of the free list sentinel.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::free_search_structure | ( | void |  | ) | `[protected]`

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

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::move_from_free_list_to_occupied_list | ( | ACE_UINT32 | slot | ) | `[protected]`

| Move from free list to occupied list.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE void ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::move_from_occupied_list_to_free_list | ( | ACE_UINT32 | slot | ) | `[protected]`

| Move from occupied list to free list.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_LOCK & ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::mutex | ( | void |  | ) |

| 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!

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_UINT32 ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::new_size | ( | void |  | ) | `[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.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::next_free | ( | ACE_UINT32 & | free_slot | ) | `[protected]`

| Finds the next free slot.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_UINT32 ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::occupied_list_id | ( | void |  | ) | const`[protected]`

| Id of the occupied list sentinel.

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

| Initialize a <Map_Manager> with size <length>. Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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 > & |  | ) | `[private]`

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rbegin | ( | void |  | ) |

| Return reverse iterator. Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

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

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE 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
| ) |

| 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. Returns 0 if a new entry is bound successfully, returns 1 if an existing entry was rebound, and returns -1 if failures occur.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE 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
| ) |

| 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. Returns 0 if a new entry is bound successfully, returns 1 if an existing entry was rebound, and returns -1 if failures occur.

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.

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.

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.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE ACE_Map_Reverse_Iterator< EXT_ID, INT_ID, ACE_LOCK > ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::rend | ( | void |  | ) |

| Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::resize_i | ( | ACE_UINT32 | new_size | ) | `[protected]`

| Resize the map. Must be called with locks held.

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.

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.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE size_t ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::total_size | ( | void |  | ) | const

| Return the total size of the map. Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

| 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 Returns 0 if a new entry is bound successfully, returns 1 if an attempt is made to bind an existing entry, and returns -1 if failures occur.

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.

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

| 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.

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

| 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_id>s are *not* dynamically allocated...) Returns 0 if successful, else -1.

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

| Unbind all entires.

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.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_INLINE int ACE_Map_Manager< EXT_ID, INT_ID, ACE_LOCK >::unbind_i | ( | const EXT_ID & | ext_id | ) | `[protected]`

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

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.

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 Function Documentation

template<class EXT_ID, class INT_ID, class ACE_LOCK>
friend class ACE_Map_Const_Iterator< EXT_ID, INT_ID, ACE_LOCK >`[friend]`

template<class EXT_ID, class INT_ID, class ACE_LOCK>
friend class ACE_Map_Const_Iterator_Base< EXT_ID, INT_ID, ACE_LOCK >`[friend]`

template<class EXT_ID, class INT_ID, class ACE_LOCK>
friend class ACE_Map_Iterator< EXT_ID, INT_ID, ACE_LOCK >`[friend]`

template<class EXT_ID, class INT_ID, class ACE_LOCK>
friend class ACE_Map_Iterator_Base< EXT_ID, INT_ID, ACE_LOCK >`[friend]`

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

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

| Declare the dynamic allocation hooks. Reimplemented in ACE_Active_Map_Manager, and ACE_Active_Map_Manager< ACE_Pair< KEY, VALUE > >.

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

| Pointer to a memory allocator.

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

| Current size of the map.

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

| Free list.

template<class EXT_ID, class INT_ID, class ACE_LOCK>
ACE_LOCK ACE_Map_Manager::lock_`[protected]`

| Synchronization variable for the MT_SAFE <ACE_Map_Manager>.

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

| Occupied list.

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

| Implement the Map as a resizeable array of <ACE_Map_Entry>.

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

| Total number of elements in this->search_structure_.

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

- Map_Manager.h
- Map_Manager.cpp
- Map_Manager.i