claw::multi_type_map_wrapper< ValueType, Map >::recursive_call Class Reference

When ValueType doesn't match Map::value_type, this class is defined as the method to call. More...

List of all members.

Public Member Functions

const ValueType & get (const Map &self, const typename Map::key_type &k) const
 Get a value from the map.
void set (Map &self, const typename Map::key_type &k, const ValueType &v) const
 Set a value in the map.
bool exists (const Map &self, const typename Map::key_type &k) const
 Tell if the map contains a value of a given type with a given key.

Detailed Description

template<typename ValueType, typename Map>
class claw::multi_type_map_wrapper< ValueType, Map >::recursive_call

When ValueType doesn't match Map::value_type, this class is defined as the method to call.

Definition at line 72 of file multi_type_map.tpp.


Member Function Documentation

template<typename ValueType , typename Map >
bool claw::multi_type_map_wrapper< ValueType, Map >::recursive_call::exists ( const Map &  self,
const typename Map::key_type &  k 
) const [inline]

Tell if the map contains a value of a given type with a given key.

Parameters:
self The map in which we search the key.
k The key of the value to check.

Definition at line 188 of file multi_type_map.tpp.

00189 {
00190   typename
00191     multi_type_map_wrapper<ValueType, typename Map::super>::method_type w;
00192   const typename Map::super& m = self;
00193 
00194   return w.exists( m, k );
00195 } // multi_type_map_wrapper::recursive_call::exists()

template<typename ValueType , typename Map >
const ValueType & claw::multi_type_map_wrapper< ValueType, Map >::recursive_call::get ( const Map &  self,
const typename Map::key_type &  k 
) const [inline]

Get a value from the map.

Parameters:
self The map in which we search the key.
k The key of the value to get.

Definition at line 153 of file multi_type_map.tpp.

00154 {
00155   typename
00156     multi_type_map_wrapper<ValueType, typename Map::super>::method_type w;
00157   const typename Map::super& m = self;
00158 
00159   return w.get( m, k );
00160 } // multi_type_map_wrapper::recursive_call::get()

template<typename ValueType , typename Map >
void claw::multi_type_map_wrapper< ValueType, Map >::recursive_call::set ( Map &  self,
const typename Map::key_type &  k,
const ValueType &  v 
) const [inline]

Set a value in the map.

Parameters:
self The map in which we search the key.
k The key of the value to set.
v The value to set.

Definition at line 171 of file multi_type_map.tpp.

00172 {
00173   typename
00174     multi_type_map_wrapper<ValueType, typename Map::super>::method_type w;
00175   typename Map::super& m = self;
00176 
00177   w.set( m, k, v );
00178 } // multi_type_map_wrapper::recursive_call::set()


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

Generated on 9 Nov 2009 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.6.1