NAME

ACE_Map_Impl - Defines a map implementation.

SYNOPSIS

#include <ace/Map_T.h>

template<class KEY, class VALUE, class IMPLEMENTATION, class ITERATOR, class REVERSE_ITERATOR, class ENTRY> class ACE_Map_Impl : public ACE_Map<KEY, VALUE> { public: 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; ACE_Map_Impl (ACE_Allocator *alloc = 0); ACE_Map_Impl (size_t size, ACE_Allocator *alloc = 0); virtual ~ACE_Map_Impl (void); virtual int open ( size_t length = ACE_DEFAULT_MAP_SIZE, ACE_Allocator *alloc = 0 ); virtual int close (void); virtual int bind (const KEY &key, const VALUE &value); virtual int bind_modify_key (const VALUE &value, 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 ); 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); virtual int find (const KEY &key); virtual int unbind (const KEY &key); virtual int unbind (const KEY &key, VALUE &value); virtual size_t current_size (void) const; virtual size_t total_size (void) const; virtual void dump (void) const; IMPLEMENTATION &impl (void); protected: IMPLEMENTATION implementation_; virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *begin_impl ( void ); 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 ); virtual ACE_Reverse_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *rend_impl ( void ); private: inline ACE_UNIMPLEMENTED_FUNC ( void operator= (const ACE_Map_Impl<KEY, VALUE, IMPLEMENTATION, ITERATOR, REVERSE_ITERATOR, ENTRY> &) ); };

DESCRIPTION

Implementation to be provided by IMPLEMENTATION.

Traits.

    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;

Initialization and termination methods.

ACE_Map_Impl (ACE_Allocator *alloc = 0);

ACE_Map_Impl (size_t size, ACE_Allocator *alloc = 0);

virtual ~ACE_Map_Impl (void);

virtual int open (
    size_t length = ACE_DEFAULT_MAP_SIZE,
    ACE_Allocator *alloc = 0
    );

virtual int close (void);

virtual int bind (const KEY &key, const VALUE &value);

virtual int bind_modify_key (const VALUE &value, 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);

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);

virtual int find (const KEY &key);

virtual int unbind (const KEY &key);

virtual int unbind (const KEY &key, VALUE &value);

virtual size_t current_size (void) const;

virtual size_t total_size (void) const;

virtual void dump (void) const;

IMPLEMENTATION &impl (void);

STL styled iterator factory functions.

virtual ACE_Iterator_Impl<ACE_Reference_Pair<const KEY, VALUE> > *begin_impl (
    void
    );

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
    );

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

Disallow these operations.

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

AUTHOR

Irfan Pyarali irfan@cs.wustl.edu

LIBRARY

ace