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

# ACE_Active_Map_Manager Class Template Reference

Define a map abstraction that associates system generated keys with user specified values. More...

`#include <Active_Map_Manager_T.h>`

Inheritance diagram for ACE_Active_Map_Manager:

[legend]
Collaboration diagram for ACE_Active_Map_Manager:

[legend]
List of all members.

## Public Types
typedef ACE_Active_Map_Manager_Key | key_type
typedef T | mapped_type
typedef ACE_Map_Entry< ACE_Active_Map_Manager_Key, T > | ENTRY
typedef ACE_Map_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > | ITERATOR
typedef ACE_Map_Reverse_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > | REVERSE_ITERATOR
typedef ENTRY | entry
typedef ITERATOR | iterator
typedef REVERSE_ITERATOR | reverse_iterator
## Public Methods
| ACE_Active_Map_Manager (ACE_Allocator *alloc=0)
| Initialize a <Active_Map_Manager> with the <ACE_DEFAULT_MAP_SIZE>. More...
| ACE_Active_Map_Manager (size_t size, ACE_Allocator *alloc=0)
| Initialize a <Active_Map_Manager> with <size> entries. More...
| ~ACE_Active_Map_Manager (void)
| Close down a <Active_Map_Manager> and release dynamically allocated resources. More...
int | open (size_t length=ACE_DEFAULT_MAP_SIZE, ACE_Allocator *alloc=0)
| Initialize a <Active_Map_Manager> with size <length>. More...
int | close (void)
| Close down a <Active_Map_Manager> and release dynamically allocated resources. More...
int | bind (const T &value, ACE_Active_Map_Manager_Key &key)
| Add <value> to the map, and the corresponding key produced by the Active_Map_Manager is returned through <key>. More...
int | bind (const T &value)
| Add <value> to the map. The user does not care about the corresponding key produced by the Active_Map_Manager. More...
int | bind (ACE_Active_Map_Manager_Key &key, T *&internal_value)
int | rebind (const ACE_Active_Map_Manager_Key &key, const T &value)
| Reassociate <key> with <value>. The function fails if <key> is not in the map. More...
int | rebind (const ACE_Active_Map_Manager_Key &key, const T &value, T &old_value)
int | rebind (const ACE_Active_Map_Manager_Key &key, const T &value, ACE_Active_Map_Manager_Key &old_key, T &old_value)
int | find (const ACE_Active_Map_Manager_Key &key, T &value) const
| Locate <value> associated with <key>. More...
int | find (const ACE_Active_Map_Manager_Key &key) const
| Is <key> in the map? More...
int | find (const ACE_Active_Map_Manager_Key &key, T *&internal_value) const
int | unbind (const ACE_Active_Map_Manager_Key &key)
| Remove <key> from the map. More...
int | unbind (const ACE_Active_Map_Manager_Key &key, T &value)
| Remove <key> from the map, and return the <value> associated with <key>. More...
int | unbind (const ACE_Active_Map_Manager_Key &key, T *&internal_value)
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...
void | dump (void) const
| Dump the state of an object. More...
ACE_Map_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > | begin (void)
| Return forward iterator. More...
ACE_Map_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > | end (void)
ACE_Map_Reverse_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > | rbegin (void)
| Return reverse iterator. More...
ACE_Map_Reverse_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > | rend (void)
## Static Public Methods
const ACE_Active_Map_Manager_Key | npos (void)
| Returns a key that cannot be found in the map. More...
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks. More...
## Protected Types
typedef ACE_Map_Manager< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > | ACE_AMM_BASE
| Private base class. More...
## Private Methods
void | operator= (const ACE_Active_Map_Manager< T > &)
| ACE_Active_Map_Manager (const ACE_Active_Map_Manager< T > &)

## Detailed Description

### template<class T>
class ACE_Active_Map_Manager< T >

Define a map abstraction that associates system generated keys with user specified values.

Since the key is system generated, searches are very fast and take a constant amount of time.

## Member Typedef Documentation

template<class T>
typedef ACE_Map_Manager<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> ACE_Active_Map_Manager::ACE_AMM_BASE`[protected]`

| Private base class.

template<class T>
typedef ENTRY ACE_Active_Map_Manager::entry

template<class T>
typedef ACE_Map_Entry<ACE_Active_Map_Manager_Key, T> ACE_Active_Map_Manager::ENTRY

| Reimplemented from ACE_Map_Manager.

template<class T>
typedef ITERATOR ACE_Active_Map_Manager::iterator

| Reimplemented from ACE_Map_Manager.

template<class T>
typedef ACE_Map_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> ACE_Active_Map_Manager::ITERATOR

| Reimplemented from ACE_Map_Manager.

template<class T>
typedef ACE_Active_Map_Manager_Key ACE_Active_Map_Manager::key_type

template<class T>
typedef T ACE_Active_Map_Manager::mapped_type

template<class T>
typedef REVERSE_ITERATOR ACE_Active_Map_Manager::reverse_iterator

| Reimplemented from ACE_Map_Manager.

template<class T>
typedef ACE_Map_Reverse_Iterator<ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex> ACE_Active_Map_Manager::REVERSE_ITERATOR

| Reimplemented from ACE_Map_Manager.

## Constructor & Destructor Documentation

template<class T>
ACE_INLINE ACE_Active_Map_Manager< T >::ACE_Active_Map_Manager | ( | ACE_Allocator * | alloc = 0 | ) |

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

template<class T>
ACE_INLINE ACE_Active_Map_Manager< T >::ACE_Active_Map_Manager | ( | size_t | size,
|  | ACE_Allocator * | alloc = 0
| ) |

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

template<class T>
ACE_INLINE ACE_Active_Map_Manager< T >::~ACE_Active_Map_Manager | ( | void |  | ) |

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

template<class T>
ACE_Active_Map_Manager< T >::ACE_Active_Map_Manager | ( | const ACE_Active_Map_Manager< T > & |  | ) | `[private]`

## Member Function Documentation

template<class T>
ACE_Map_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > ACE_Active_Map_Manager< T >::begin | ( | void |  | ) |

| Return forward iterator. Reimplemented from ACE_Map_Manager.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::bind | ( | ACE_Active_Map_Manager_Key & | key,
|  | T *& | internal_value
| ) |

| Reserves a slot in the internal structure and returns the key and a pointer to the value. User should place their <value> into <*internal_value>. This method is useful in reducing the number of copies required in some cases. Note that <internal_value> is only a temporary pointer and will change when the map resizes. Therefore, the user should use the pointer immediately and not hold on to it.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::bind | ( | const T & | value | ) |

| Add <value> to the map. The user does not care about the corresponding key produced by the Active_Map_Manager.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::bind | ( | const T & | value,
|  | ACE_Active_Map_Manager_Key & | key
| ) |

| Add <value> to the map, and the corresponding key produced by the Active_Map_Manager is returned through <key>.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::close | ( | void |  | ) |

| Close down a <Active_Map_Manager> and release dynamically allocated resources. Reimplemented from ACE_Map_Manager.

template<class T>
ACE_INLINE size_t ACE_Active_Map_Manager< T >::current_size | ( | void |  | ) | const

| Return the current size of the map. Reimplemented from ACE_Map_Manager.

template<class T>
ACE_INLINE void ACE_Active_Map_Manager< T >::dump | ( | void |  | ) | const

| Dump the state of an object. Reimplemented from ACE_Map_Manager.

template<class T>
ACE_INLINE ACE_Map_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > ACE_Active_Map_Manager< T >::end | ( | void |  | ) |

| Reimplemented from ACE_Map_Manager.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::find | ( | const ACE_Active_Map_Manager_Key & | key,
|  | T *& | internal_value
| ) | const

| Locate <value> associated with <key>. The value is returned via <internal_value> and hence a copy is saved. Note that <internal_value> is only a temporary pointer and will change when the map resizes. Therefore, the user should use the pointer immediately and not hold on to it.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::find | ( | const ACE_Active_Map_Manager_Key & | key | ) | const

| Is <key> in the map?

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::find | ( | const ACE_Active_Map_Manager_Key & | key,
|  | T & | value
| ) | const

| Locate <value> associated with <key>.

template<class T>
ACE_INLINE const ACE_Active_Map_Manager_Key ACE_Active_Map_Manager< T >::npos | ( | void |  | ) | `[static]`

| Returns a key that cannot be found in the map.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::open | ( | size_t | length = ACE_DEFAULT_MAP_SIZE,
|  | ACE_Allocator * | alloc = 0
| ) |

| Initialize a <Active_Map_Manager> with size <length>. Reimplemented from ACE_Map_Manager.

template<class T>
void ACE_Active_Map_Manager< T >::operator= | ( | const ACE_Active_Map_Manager< T > & |  | ) | `[private]`

template<class T>
ACE_INLINE ACE_Map_Reverse_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > ACE_Active_Map_Manager< T >::rbegin | ( | void |  | ) |

| Return reverse iterator. Reimplemented from ACE_Map_Manager.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::rebind | ( | const ACE_Active_Map_Manager_Key & | key,
|  | const T & | value,
|  | ACE_Active_Map_Manager_Key & | old_key,
|  | T & | old_value
| ) |

| Reassociate <key> with <value>, storing the old key and value into the "out" parameter <old_key> and <old_value>. The function fails if <key> is not in the map.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::rebind | ( | const ACE_Active_Map_Manager_Key & | key,
|  | const T & | value,
|  | T & | old_value
| ) |

| Reassociate <key> with <value>, storing the old value into the "out" parameter <old_value>. The function fails if <key> is not in the map.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::rebind | ( | const ACE_Active_Map_Manager_Key & | key,
|  | const T & | value
| ) |

| Reassociate <key> with <value>. The function fails if <key> is not in the map.

template<class T>
ACE_INLINE ACE_Map_Reverse_Iterator< ACE_Active_Map_Manager_Key, T, ACE_Null_Mutex > ACE_Active_Map_Manager< T >::rend | ( | void |  | ) |

| Reimplemented from ACE_Map_Manager.

template<class T>
ACE_INLINE size_t ACE_Active_Map_Manager< T >::total_size | ( | void |  | ) | const

| Return the total size of the map. Reimplemented from ACE_Map_Manager.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::unbind | ( | const ACE_Active_Map_Manager_Key & | key,
|  | T *& | internal_value
| ) |

| Locate <value> associated with <key>. The value is returned via <internal_value> and hence a copy is saved. Note that <internal_value> is only a temporary pointer and will change when the map resizes or when this slot is reused. Therefore, the user should use the pointer immediately and not hold on to it.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::unbind | ( | const ACE_Active_Map_Manager_Key & | key,
|  | T & | value
| ) |

| Remove <key> from the map, and return the <value> associated with <key>.

template<class T>
ACE_INLINE int ACE_Active_Map_Manager< T >::unbind | ( | const ACE_Active_Map_Manager_Key & | key | ) |

| Remove <key> from the map.

## Member Data Documentation

template<class T>
ACE_Active_Map_Manager::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks. Reimplemented from ACE_Map_Manager.

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

- Active_Map_Manager_T.h
- Active_Map_Manager_T.i