Dune::ForEachType< TypeEvaluator, TupleType > Struct Template Reference

Helper template to clone the type definition of a tuple with the storage types replaced by a user-defined rule. More...

#include <dune/common/utility.hh>

List of all members.

Public Types

typedef ForEachTypeHelper
< TypeEvaluator, TupleType,
tuple_size< TupleType >::value >
::Type 
Type

Detailed Description

template<template< class > class TypeEvaluator, class TupleType>
struct Dune::ForEachType< TypeEvaluator, TupleType >

Helper template to clone the type definition of a tuple with the storage types replaced by a user-defined rule.

Suppose all storage types A_i in a tuple define a type A_i::B. You can build up a pair consisting of the types defined by A_i::B in the following way:

   template <class A>
   struct MyEvaluator {
     typedef typename A::B Type;
   };

   typedef ForEachType<MyEvaluator, ATuple>::Type BTuple;

Here, MyEvaluator is a helper struct that extracts the correct type from the storage types of the tuple defined by the tuple ATuple.


Member Typedef Documentation

template<template< class > class TypeEvaluator, class TupleType >
typedef ForEachTypeHelper<TypeEvaluator,TupleType, tuple_size<TupleType>::value>::Type Dune::ForEachType< TypeEvaluator, TupleType >::Type

The documentation for this struct was generated from the following file:
Generated on Mon Apr 26 10:45:24 2010 for dune-common by  doxygen 1.6.3