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

This class provides types and methods to allow the call of methods recursively along the inherintance hierarchy. More...

List of all members.

Classes

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

Public Types

typedef meta::if_then_else
< meta::same_type< ValueType,
typename Map::value_type >
::result, last_call,
recursive_call >::result 
method_type
 Define the type of the method to call, according to the current template parameters.

Detailed Description

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

This class provides types and methods to allow the call of methods recursively along the inherintance hierarchy.

Suppose we have defined the following variable

multi_type_map<int, type_list<std::string, type_list<int, no_type> > > my_map;

The call int i = my_map.get<int>( 24 ); doesn't match the type of the end class. So the call is repercuted on the parent class until the types match. Then, we can get the values in m_data.

Author:
Julien Jorge

Definition at line 50 of file multi_type_map.tpp.


Member Typedef Documentation

template<typename ValueType, typename Map>
typedef meta::if_then_else< meta::same_type<ValueType, typename Map::value_type>::result, last_call, recursive_call >::result claw::multi_type_map_wrapper< ValueType, Map >::method_type

Define the type of the method to call, according to the current template parameters.

Definition at line 90 of file multi_type_map.tpp.


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