libmoost
moost::container::policies::generic_map< TMap > Class Template Reference

#include <generic_map.hpp>

List of all members.

Public Types

typedef TMap map_type

Public Member Functions

virtual ~generic_map ()
virtual void init (TMap &) const
virtual void resize (TMap &, size_t) const
 Tells how to resize a map to make enough space for a given number of keys.
virtual void swap (TMap &first, TMap &second) const
virtual size_t size (const TMap &map) const
 Tells how to retrieve the size of the map.
virtual void clear (TMap &map) const
template<typename TKey >
bool remove (TMap &map, const TKey &key) const
template<typename TKey >
bool find (const TMap &map, const TKey &key) const
template<typename TKey , typename TVal >
TVal operator() (const TMap &map, const TKey &key) const
template<typename TKey , typename TVal >
bool operator() (const TMap &map, const TKey &key, TVal &val) const
template<typename Key , typename T >
bool put (TMap &map, const Key &key, const T &val) const
template<typename TKey >
void get_keys (const TMap &map, std::vector< TKey > &keys) const
template<typename TKey , typename TMapIterator >
TKey get_key (const TMap &, const TMapIterator &it) const
template<typename TVal , typename TMapIterator >
TVal get_value (const TMap &, const TMapIterator &it) const
template<typename TKey , typename TMapIterator >
void get_key (TKey &key, const TMap &map, const TMapIterator &it) const
template<typename TVal , typename TMapIterator >
void get_value (TVal &value, const TMap &map, const TMapIterator &it) const

Detailed Description

template<typename TMap>
class moost::container::policies::generic_map< TMap >

generic_map: works with std::map

Definition at line 40 of file generic_map.hpp.


Member Typedef Documentation


Constructor & Destructor Documentation

template<typename TMap>
virtual moost::container::policies::generic_map< TMap >::~generic_map ( ) [inline, virtual]

Definition at line 46 of file generic_map.hpp.


Member Function Documentation

template<typename TMap>
virtual void moost::container::policies::generic_map< TMap >::clear ( TMap &  map) const [inline, virtual]

Definition at line 62 of file generic_map.hpp.

template<typename TMap>
template<typename TKey >
bool moost::container::policies::generic_map< TMap >::find ( const TMap &  map,
const TKey &  key 
) const [inline]

Definition at line 76 of file generic_map.hpp.

template<typename TMap>
template<typename TKey , typename TMapIterator >
TKey moost::container::policies::generic_map< TMap >::get_key ( const TMap &  ,
const TMapIterator &  it 
) const [inline]

Reimplemented in moost::container::policies::vector_map< TVal >.

Definition at line 120 of file generic_map.hpp.

template<typename TMap>
template<typename TKey , typename TMapIterator >
void moost::container::policies::generic_map< TMap >::get_key ( TKey &  key,
const TMap &  map,
const TMapIterator &  it 
) const [inline]

Definition at line 128 of file generic_map.hpp.

template<typename TMap>
template<typename TKey >
void moost::container::policies::generic_map< TMap >::get_keys ( const TMap &  map,
std::vector< TKey > &  keys 
) const [inline]

Definition at line 106 of file generic_map.hpp.

template<typename TMap>
template<typename TVal , typename TMapIterator >
TVal moost::container::policies::generic_map< TMap >::get_value ( const TMap &  ,
const TMapIterator &  it 
) const [inline]

Reimplemented in moost::container::policies::vector_map< TVal >.

Definition at line 124 of file generic_map.hpp.

Here is the caller graph for this function:

template<typename TMap>
template<typename TVal , typename TMapIterator >
void moost::container::policies::generic_map< TMap >::get_value ( TVal &  value,
const TMap &  map,
const TMapIterator &  it 
) const [inline]

Definition at line 132 of file generic_map.hpp.

template<typename TMap>
virtual void moost::container::policies::generic_map< TMap >::init ( TMap &  ) const [inline, virtual]

Reimplemented in moost::container::policies::vector_map< TVal >, and moost::container::policies::dense_hs_map< TKey, TVal >.

Definition at line 48 of file generic_map.hpp.

Here is the caller graph for this function:

template<typename TMap>
template<typename TKey , typename TVal >
TVal moost::container::policies::generic_map< TMap >::operator() ( const TMap &  map,
const TKey &  key 
) const [inline]

Reimplemented in moost::container::policies::vector_map< TVal >.

Definition at line 80 of file generic_map.hpp.

template<typename TMap>
template<typename TKey , typename TVal >
bool moost::container::policies::generic_map< TMap >::operator() ( const TMap &  map,
const TKey &  key,
TVal &  val 
) const [inline]

Reimplemented in moost::container::policies::vector_map< TVal >.

Definition at line 89 of file generic_map.hpp.

template<typename TMap>
template<typename Key , typename T >
bool moost::container::policies::generic_map< TMap >::put ( TMap &  map,
const Key &  key,
const T &  val 
) const [inline]

Definition at line 99 of file generic_map.hpp.

template<typename TMap>
template<typename TKey >
bool moost::container::policies::generic_map< TMap >::remove ( TMap &  map,
const TKey &  key 
) const [inline]

Definition at line 66 of file generic_map.hpp.

template<typename TMap>
virtual void moost::container::policies::generic_map< TMap >::resize ( TMap &  ,
size_t   
) const [inline, virtual]

Tells how to resize a map to make enough space for a given number of keys.

Reimplemented in moost::container::policies::vector_map< TVal >, and moost::container::policies::dense_hs_map< TKey, TVal >.

Definition at line 52 of file generic_map.hpp.

template<typename TMap>
virtual size_t moost::container::policies::generic_map< TMap >::size ( const TMap &  map) const [inline, virtual]

Tells how to retrieve the size of the map.

Definition at line 59 of file generic_map.hpp.

Here is the caller graph for this function:

template<typename TMap>
virtual void moost::container::policies::generic_map< TMap >::swap ( TMap &  first,
TMap &  second 
) const [inline, virtual]

Definition at line 55 of file generic_map.hpp.


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