ACE_Map< KEY, VALUE > Class Template Reference

Defines a map interface. More...

#include <Map_T.h>

Inheritance diagram for ACE_Map< KEY, VALUE >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef KEY key_type
typedef VALUE mapped_type
typedef ACE_Reference_Pair<
const KEY, VALUE > 
value_type
typedef ACE_Iterator< value_typeiterator
typedef ACE_Reverse_Iterator<
value_type
reverse_iterator
typedef ACE_Iterator_Impl<
value_type
iterator_implementation
typedef ACE_Reverse_Iterator_Impl<
value_type
reverse_iterator_implementation

Public Member Functions

virtual ~ACE_Map (void)
 Close down and release dynamically allocated resources.

virtual int open (size_t length=ACE_DEFAULT_MAP_SIZE, ACE_Allocator *alloc=0)=0
 Initialize a with size .

virtual int close (void)=0
 Close down a and release dynamically allocated resources.

virtual int bind (const KEY &key, const VALUE &value)=0
virtual int bind_modify_key (const VALUE &value, KEY &key)=0
virtual int create_key (KEY &key)=0
virtual int bind_create_key (const VALUE &value, KEY &key)=0
virtual int bind_create_key (const VALUE &value)=0
virtual int recover_key (const KEY &modified_key, KEY &original_key)=0
virtual int rebind (const KEY &key, const VALUE &value)=0
virtual int rebind (const KEY &key, const VALUE &value, VALUE &old_value)=0
virtual int rebind (const KEY &key, const VALUE &value, KEY &old_key, VALUE &old_value)=0
virtual int trybind (const KEY &key, VALUE &value)=0
virtual int find (const KEY &key, VALUE &value)=0
 Locate associated with .

virtual int find (const KEY &key)=0
 Is in the map?

virtual int unbind (const KEY &key)=0
 Remove from the map.

virtual int unbind (const KEY &key, VALUE &value)=0
virtual size_t current_size (void) const=0
 Return the current size of the map.

virtual size_t total_size (void) const=0
 Return the total size of the map.

virtual void dump (void) const=0
 Dump the state of an object.

iterator begin (void)
 Return forward iterator.

iterator end (void)
reverse_iterator rbegin (void)
 Return reverse iterator.

reverse_iterator rend (void)

Protected Member Functions

 ACE_Map (void)
virtual ACE_Iterator_Impl<
ACE_Reference_Pair< const
KEY, VALUE > > * 
begin_impl (void)=0
 Return forward iterator.

virtual ACE_Iterator_Impl<
ACE_Reference_Pair< const
KEY, VALUE > > * 
end_impl (void)=0
virtual ACE_Reverse_Iterator_Impl<
ACE_Reference_Pair< const
KEY, VALUE > > * 
rbegin_impl (void)=0
 Return reverse iterator.

virtual ACE_Reverse_Iterator_Impl<
ACE_Reference_Pair< const
KEY, VALUE > > * 
rend_impl (void)=0

Private Member Functions

void operator= (const ACE_Map< KEY, VALUE > &)
 ACE_Map (const ACE_Map< KEY, VALUE > &)

Detailed Description

template<class KEY, class VALUE>
class ACE_Map< KEY, VALUE >

Defines a map interface.

Implementation to be provided by subclasses.

Definition at line 263 of file Map_T.h.


Member Typedef Documentation

template<class KEY, class VALUE>
typedef ACE_Iterator<value_type> ACE_Map< KEY, VALUE >::iterator
 

Definition at line 275 of file Map_T.h.

Referenced by ACE_Map< KEY, VALUE >::begin(), and ACE_Map< KEY, VALUE >::end().

template<class KEY, class VALUE>
typedef ACE_Iterator_Impl<value_type> ACE_Map< KEY, VALUE >::iterator_implementation
 

Definition at line 279 of file Map_T.h.

template<class KEY, class VALUE>
typedef KEY ACE_Map< KEY, VALUE >::key_type
 

Definition at line 269 of file Map_T.h.

template<class KEY, class VALUE>
typedef VALUE ACE_Map< KEY, VALUE >::mapped_type
 

Definition at line 271 of file Map_T.h.

template<class KEY, class VALUE>
typedef ACE_Reverse_Iterator<value_type> ACE_Map< KEY, VALUE >::reverse_iterator
 

Definition at line 277 of file Map_T.h.

Referenced by ACE_Map< KEY, VALUE >::rbegin(), and ACE_Map< KEY, VALUE >::rend().

template<class KEY, class VALUE>
typedef ACE_Reverse_Iterator_Impl<value_type> ACE_Map< KEY, VALUE >::reverse_iterator_implementation
 

Definition at line 281 of file Map_T.h.

template<class KEY, class VALUE>
typedef ACE_Reference_Pair<const KEY, VALUE> ACE_Map< KEY, VALUE >::value_type
 

Definition at line 273 of file Map_T.h.


Constructor & Destructor Documentation

template<class KEY, class VALUE>
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Map< KEY, VALUE >::~ACE_Map void   )  [virtual]
 

Close down and release dynamically allocated resources.

Definition at line 19 of file Map_T.cpp.

00020 {
00021 }

template<class KEY, class VALUE>
ACE_INLINE ACE_Map< KEY, VALUE >::ACE_Map void   )  [protected]
 

Definition at line 193 of file Map_T.inl.

00194 {
00195 }

template<class KEY, class VALUE>
ACE_Map< KEY, VALUE >::ACE_Map const ACE_Map< KEY, VALUE > &   )  [private]
 


Member Function Documentation

template<class KEY, class VALUE>
ACE_INLINE ACE_Iterator< ACE_Reference_Pair< const KEY, VALUE > > ACE_Map< KEY, VALUE >::begin void   ) 
 

Return forward iterator.

Definition at line 198 of file Map_T.inl.

References ACE_Map< KEY, VALUE >::iterator.

00199 {
00200   return iterator (this->begin_impl ());
00201 }

template<class KEY, class VALUE>
virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> >* ACE_Map< KEY, VALUE >::begin_impl void   )  [protected, pure virtual]
 

Return forward iterator.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::bind const KEY &  key,
const VALUE &  value
[pure virtual]
 

Add / pair to the map. If is already in the map then no changes are made and 1 is returned. Returns 0 on a successful addition. This function fails for maps that do not allow user specified keys. is an "in" parameter.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::bind_create_key const VALUE &  value  )  [pure virtual]
 

Add to the map. The user does not care about the corresponding key produced by the Map. For maps that do not naturally produce keys, the map adapters will use the class to produce a key. However, the users are responsible for not jeopardizing this key production scheme by using user specified keys with keys produced by the key generator.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::bind_create_key const VALUE &  value,
KEY &  key
[pure virtual]
 

Add to the map, and the corresponding key produced by the Map is returned through which is an "out" parameter. For maps that do not naturally produce keys, the map adapters will use the class to produce a key. However, the users are responsible for not jeopardizing this key production scheme by using user specified keys with keys produced by the key generator.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::bind_modify_key const VALUE &  value,
KEY &  key
[pure virtual]
 

Add / pair to the map. is an "inout" parameter and maybe modified/extended by the map to add additional information. To recover original key, call the method.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::close void   )  [pure virtual]
 

Close down a and release dynamically allocated resources.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::create_key KEY &  key  )  [pure virtual]
 

Produce a key and return it through which is an "out" parameter. For maps that do not naturally produce keys, the map adapters will use the class to produce a key. However, the users are responsible for not jeopardizing this key production scheme by using user specified keys with keys produced by the key generator.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual size_t ACE_Map< KEY, VALUE >::current_size void   )  const [pure virtual]
 

Return the current size of the map.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual void ACE_Map< KEY, VALUE >::dump void   )  const [pure virtual]
 

Dump the state of an object.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
ACE_INLINE ACE_Iterator< ACE_Reference_Pair< const KEY, VALUE > > ACE_Map< KEY, VALUE >::end void   ) 
 

Definition at line 204 of file Map_T.inl.

References ACE_Map< KEY, VALUE >::iterator.

00205 {
00206   return iterator (this->end_impl ());
00207 }

template<class KEY, class VALUE>
virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> >* ACE_Map< KEY, VALUE >::end_impl void   )  [protected, pure virtual]
 

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::find const KEY &  key  )  [pure virtual]
 

Is in the map?

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::find const KEY &  key,
VALUE &  value
[pure virtual]
 

Locate associated with .

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::open size_t  length = ACE_DEFAULT_MAP_SIZE,
ACE_Allocator alloc = 0
[pure virtual]
 

Initialize a with size .

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
void ACE_Map< KEY, VALUE >::operator= const ACE_Map< KEY, VALUE > &   )  [private]
 

template<class KEY, class VALUE>
ACE_INLINE ACE_Reverse_Iterator< ACE_Reference_Pair< const KEY, VALUE > > ACE_Map< KEY, VALUE >::rbegin void   ) 
 

Return reverse iterator.

Definition at line 210 of file Map_T.inl.

References ACE_Map< KEY, VALUE >::reverse_iterator.

00211 {
00212   return reverse_iterator (this->rbegin_impl ());
00213 }

template<class KEY, class VALUE>
virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> >* ACE_Map< KEY, VALUE >::rbegin_impl void   )  [protected, pure virtual]
 

Return reverse iterator.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::rebind const KEY &  key,
const VALUE &  value,
KEY &  old_key,
VALUE &  old_value
[pure virtual]
 

Reassociate with , storing the old key and value into the "out" parameters and . The function fails if is not in the map for maps that do not allow user specified keys. However, for maps that allow user specified keys, if the key is not in the map, a new / association is created.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::rebind const KEY &  key,
const VALUE &  value,
VALUE &  old_value
[pure virtual]
 

Reassociate with , storing the old value into the "out" parameter . The function fails if is not in the map for maps that do not allow user specified keys. However, for maps that allow user specified keys, if the key is not in the map, a new / association is created.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::rebind const KEY &  key,
const VALUE &  value
[pure virtual]
 

Reassociate with . The function fails if is not in the map for maps that do not allow user specified keys. However, for maps that allow user specified keys, if the key is not in the map, a new / association is created.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::recover_key const KEY &  modified_key,
KEY &  original_key
[pure virtual]
 

Recovers the original key potentially modified by the map during .

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
ACE_INLINE ACE_Reverse_Iterator< ACE_Reference_Pair< const KEY, VALUE > > ACE_Map< KEY, VALUE >::rend void   ) 
 

Definition at line 216 of file Map_T.inl.

References ACE_Map< KEY, VALUE >::reverse_iterator.

00217 {
00218   return reverse_iterator (this->rend_impl ());
00219 }

template<class KEY, class VALUE>
virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> >* ACE_Map< KEY, VALUE >::rend_impl void   )  [protected, pure virtual]
 

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual size_t ACE_Map< KEY, VALUE >::total_size void   )  const [pure virtual]
 

Return the total size of the map.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::trybind const KEY &  key,
VALUE &  value
[pure virtual]
 

Associate with if and only if is not in the map. If is already in the map, then the parameter is overwritten with the existing value in the map. Returns 0 if a new / association is created. Returns 1 if an attempt is made to bind an existing entry. This function fails for maps that do not allow user specified keys.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::unbind const KEY &  key,
VALUE &  value
[pure virtual]
 

Remove from the map, and return the associated with .

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.

template<class KEY, class VALUE>
virtual int ACE_Map< KEY, VALUE >::unbind const KEY &  key  )  [pure virtual]
 

Remove from the map.

Implemented in ACE_Map_Impl< KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY >, ACE_Active_Map_Manager_Adapter< KEY, VALUE, KEY_ADAPTER >, ACE_Hash_Map_Manager_Ex_Adapter< KEY, VALUE, HASH_KEY, COMPARE_KEYS, KEY_GENERATOR >, and ACE_Map_Manager_Adapter< KEY, VALUE, KEY_GENERATOR >.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:24:23 2006 for ACE by doxygen 1.3.6