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

ACE_Map_Impl Class Template Reference

Defines a map implementation. More...

#include <Map_T.h>

Inheritance diagram for ACE_Map_Impl

Inheritance graph
[legend]
Collaboration diagram for ACE_Map_Impl:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ACE_Map_Impl_Iterator_Adapter<
ACE_TYPENAME ACE_Map<KEY,
VALUE>::value_type, ITERATOR,
ENTRY> 
iterator_impl
typedef ACE_Map_Impl_Reverse_Iterator_Adapter<
ACE_TYPENAME ACE_Map<KEY,
VALUE>::value_type, REVERSE_ITERATOR,
ENTRY> 
reverse_iterator_impl
typedef IMPLEMENTATION implementation

Public Methods

 ACE_Map_Impl (ACE_Allocator *alloc = 0)
 Initialize with the .

 ACE_Map_Impl (size_t size, ACE_Allocator *alloc = 0)
 Initialize with <size> entries. The <size> parameter is ignored by maps for which an initialize size does not make sense.

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

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

virtual int close (void)
 Close down a <Map> and release dynamically allocated resources.

virtual int bind (const KEY &key, const VALUE &value)
virtual int bind_modify_key (const VALUE &value, KEY &key)
virtual int create_key (KEY &key)
virtual int bind_create_key (const VALUE &value, KEY &key)
virtual int bind_create_key (const VALUE &value)
virtual int recover_key (const KEY &modified_key, KEY &original_key)
 Recovers the original key potentially modified by the map during <bind_modify_key>.

virtual int rebind (const KEY &key, const VALUE &value)
virtual int rebind (const KEY &key, const VALUE &value, VALUE &old_value)
virtual int rebind (const KEY &key, const VALUE &value, KEY &old_key, VALUE &old_value)
virtual int trybind (const KEY &key, VALUE &value)
virtual int find (const KEY &key, VALUE &value)
 Locate <value> associated with <key>.

virtual int find (const KEY &key)
 Is <key> in the map?

virtual int unbind (const KEY &key)
 Remove <key> from the map.

virtual int unbind (const KEY &key, VALUE &value)
 Remove <key> from the map, and return the <value> associated with <key>.

virtual size_t current_size (void) const
 Return the current size of the map.

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

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

IMPLEMENTATION& impl (void)
 Accessor to implementation object.


Protected Methods

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

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

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

Protected Attributes

IMPLEMENTATION implementation_
 All implementation details are forwarded to this class.


Private Methods

void operator= (const ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> &)
 ACE_Map_Impl (const ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> &)

Detailed Description

template<class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> template class ACE_Map_Impl

Defines a map implementation.

Implementation to be provided by <IMPLEMENTATION>.


Member Typedef Documentation

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
typedef IMPLEMENTATION ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::implementation
 

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
typedef ACE_Map_Impl_Iterator_Adapter<ACE_TYPENAME ACE_Map<KEY, VALUE>::value_type, ITERATOR, ENTRY> ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::iterator_impl
 

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
typedef ACE_Map_Impl_Reverse_Iterator_Adapter<ACE_TYPENAME ACE_Map<KEY, VALUE>::value_type, REVERSE_ITERATOR, ENTRY> ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::reverse_iterator_impl
 


Constructor & Destructor Documentation

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> ( ACE_Allocator * alloc = 0 )
 

Initialize with the .

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> ( size_t size,
ACE_Allocator * alloc = 0 )
 

Initialize with <size> entries. The <size> parameter is ignored by maps for which an initialize size does not make sense.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::~ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> ( void ) [virtual]
 

Close down and release dynamically allocated resources.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> ( const ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >& ) [private]
 


Member Function Documentation

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE ACE_Iterator_Impl< ACE_Reference_Pair< const KEY,VALUE > >* ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::begin_impl ( void ) [protected, virtual]
 

Return forward iterator.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::bind ( const KEY & key,
const VALUE & value ) [virtual]
 

Add <key>/<value> pair to the map. If <key> 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. <key> is an "in" parameter.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::bind_create_key ( const VALUE & value ) [virtual]
 

Add <value> 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 <KEY_GENERATOR> 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.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::bind_create_key ( const VALUE & value,
KEY & key ) [virtual]
 

Add <value> to the map, and the corresponding key produced by the Map is returned through <key> which is an "out" parameter. For maps that do not naturally produce keys, the map adapters will use the <KEY_GENERATOR> 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.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::bind_modify_key ( const VALUE & value,
KEY & key ) [virtual]
 

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

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::close ( void ) [virtual]
 

Close down a <Map> and release dynamically allocated resources.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::create_key ( KEY & key ) [virtual]
 

Produce a key and return it through <key> which is an "out" parameter. For maps that do not naturally produce keys, the map adapters will use the <KEY_GENERATOR> 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.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE size_t ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::current_size ( void ) const [virtual]
 

Return the current size of the map.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE void ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::dump ( void ) const [virtual]
 

Dump the state of an object.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE ACE_Iterator_Impl< ACE_Reference_Pair< const KEY,VALUE > >* ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::end_impl ( void ) [protected, virtual]
 

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::find ( const KEY & key ) [virtual]
 

Is <key> in the map?

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::find ( const KEY & key,
VALUE & value ) [virtual]
 

Locate <value> associated with <key>.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE IMPLEMENTATION & ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::impl ( void )
 

Accessor to implementation object.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::open ( size_t length = ACE_DEFAULT_MAP_SIZE,
ACE_Allocator * alloc = 0 ) [virtual]
 

Initialize a <Map> with size <length>.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
void ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::operator= ( const ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >& ) [private]
 

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE ACE_Reverse_Iterator_Impl< ACE_Reference_Pair< const KEY,VALUE > >* ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::rbegin_impl ( void ) [protected, virtual]
 

Return reverse iterator.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::rebind ( const KEY & key,
const VALUE & value,
KEY & old_key,
VALUE & old_value ) [virtual]
 

Reassociate <key> with <value>, storing the old key and value into the "out" parameters <old_key> and <old_value>. The function fails if <key> 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 <key>/<value> association is created.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::rebind ( const KEY & key,
const VALUE & value,
VALUE & old_value ) [virtual]
 

Reassociate <key> with <value>, storing the old value into the "out" parameter <old_value>. The function fails if <key> 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 <key>/<value> association is created.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::rebind ( const KEY & key,
const VALUE & value ) [virtual]
 

Reassociate <key> with <value>. The function fails if <key> 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 <key>/<value> association is created.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::recover_key ( const KEY & modified_key,
KEY & original_key ) [virtual]
 

Recovers the original key potentially modified by the map during <bind_modify_key>.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE ACE_Reverse_Iterator_Impl< ACE_Reference_Pair< const KEY,VALUE > >* ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::rend_impl ( void ) [protected, virtual]
 

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE size_t ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::total_size ( void ) const [virtual]
 

Return the total size of the map.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::trybind ( const KEY & key,
VALUE & value ) [virtual]
 

Associate <key> with <value> if and only if <key> is not in the map. If <key> is already in the map, then the <value> parameter is overwritten with the existing value in the map. Returns 0 if a new <key>/<value> 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.

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::unbind ( const KEY & key,
VALUE & value ) [virtual]
 

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

Reimplemented from ACE_Map.

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
ACE_INLINE int ACE_Map_Impl< KEY,VALUE,IMPLEMENTATION,ITERATOR,REVERSE_ITERATOR,ENTRY >::unbind ( const KEY & key ) [virtual]
 

Remove <key> from the map.

Reimplemented from ACE_Map.


Member Data Documentation

template<classKEY, classVALUE, classIMPLEMENTATION, classITERATOR, classREVERSE_ITERATOR, classENTRY>
IMPLEMENTATION ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY>::implementation_ [protected]
 

All implementation details are forwarded to this class.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 10:31:12 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000