4 #ifndef DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
5 #define DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
11 #include <dune/common/exceptions.hh>
12 #include <dune/common/shared_ptr.hh>
13 #include <dune/common/tuples.hh>
24 template<
typename SourceNode,
typename Transformation,
typename TransformedNode>
33 static transformed_type
transform(
const SourceNode& s,
const Transformation& t)
38 static transformed_type
transform(shared_ptr<const SourceNode> s,
const Transformation& t)
43 static transformed_storage_type
transform_storage(shared_ptr<const SourceNode> s,
const Transformation& t)
45 return make_shared<transformed_type>(s,t);
51 template<
typename SourceNode,
typename Transformation,
template<
typename Child>
class TransformedNodeTemplate>
60 typedef typename TransformedNodeTemplate<TC>::type
type;
65 static typename result<TC>::type
transform(
const SourceNode& s,
const Transformation& t,
const std::array<shared_ptr<TC>,result<TC>::type::CHILDREN>& children)
71 static typename result<TC>::type
transform(shared_ptr<const SourceNode> s,
const Transformation& t,
const std::array<shared_ptr<TC>,result<TC>::type::CHILDREN>& children)
77 static typename result<TC>::storage_type
transform_storage(shared_ptr<const SourceNode> s,
const Transformation& t,
const std::array<shared_ptr<TC>,result<TC>::type::CHILDREN>& children)
79 return make_shared<typename result<TC>::type>(s,t,children);
85 template<
typename SourceNode,
typename Transformation,
template<
typename,
typename,std::
size_t>
class TransformedNode>
89 GenericPowerNodeTransformationTemplate<SourceNode,
91 TransformedNode>::template result
96 template<
typename SourceNode,
typename Transformation,
template<
typename...>
class TransformedNodeTemplate>
102 template<
typename... TC>
109 template<
typename... TC>
110 static typename result<TC...>::type
transform(
const SourceNode& s,
const Transformation& t, shared_ptr<TC>... children)
115 template<
typename... TC>
116 static typename result<TC...>::type
transform(shared_ptr<const SourceNode> s,
const Transformation& t, shared_ptr<TC>... children)
121 template<
typename... TC>
122 static typename result<TC...>::storage_type
transform_storage(shared_ptr<const SourceNode> s,
const Transformation& t, shared_ptr<TC>... children)
124 return make_shared<
typename result<TC...>::type>(s,t,children...);
130 template<
typename SourceNode,
typename Transformation,
template<
typename,
typename...>
class TransformedNode>
134 GenericCompositeNodeTransformationTemplate<SourceNode,
136 TransformedNode>::template result
145 #endif // DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
static result< TC...>::type transform(shared_ptr< const SourceNode > s, const Transformation &t, shared_ptr< TC >...children)
Definition: generictransformationdescriptors.hh:116
static transformed_type transform(shared_ptr< const SourceNode > s, const Transformation &t)
Definition: generictransformationdescriptors.hh:38
static const bool recursive
Definition: generictransformationdescriptors.hh:55
Definition: generictransformationdescriptors.hh:25
TransformedNodeTemplate< TC >::type type
Definition: generictransformationdescriptors.hh:60
static result< TC...>::type transform(const SourceNode &s, const Transformation &t, shared_ptr< TC >...children)
Definition: generictransformationdescriptors.hh:110
Definition: accumulate_static.hh:12
Definition: generictransformationdescriptors.hh:103
static result< TC >::type transform(shared_ptr< const SourceNode > s, const Transformation &t, const std::array< shared_ptr< TC >, result< TC >::type::CHILDREN > &children)
Definition: generictransformationdescriptors.hh:71
Definition: generictransformationdescriptors.hh:58
shared_ptr< type > storage_type
Definition: generictransformationdescriptors.hh:106
static transformed_storage_type transform_storage(shared_ptr< const SourceNode > s, const Transformation &t)
Definition: generictransformationdescriptors.hh:43
Definition: generictransformationdescriptors.hh:131
TransformedNodeTemplate< TC...>::type type
Definition: generictransformationdescriptors.hh:105
TransformedNode transformed_type
Definition: generictransformationdescriptors.hh:30
static const bool recursive
Definition: generictransformationdescriptors.hh:28
Definition: generictransformationdescriptors.hh:86
Definition: generictransformationdescriptors.hh:52
static result< TC >::storage_type transform_storage(shared_ptr< const SourceNode > s, const Transformation &t, const std::array< shared_ptr< TC >, result< TC >::type::CHILDREN > &children)
Definition: generictransformationdescriptors.hh:77
static result< TC...>::storage_type transform_storage(shared_ptr< const SourceNode > s, const Transformation &t, shared_ptr< TC >...children)
Definition: generictransformationdescriptors.hh:122
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::array< shared_ptr< TC >, result< TC >::type::CHILDREN > &children)
Definition: generictransformationdescriptors.hh:65
shared_ptr< transformed_type > transformed_storage_type
Definition: generictransformationdescriptors.hh:31
static const bool recursive
Definition: generictransformationdescriptors.hh:100
static transformed_type transform(const SourceNode &s, const Transformation &t)
Definition: generictransformationdescriptors.hh:33
static const result_type result
Definition: accumulate_static.hh:109
Definition: generictransformationdescriptors.hh:97
shared_ptr< type > storage_type
Definition: generictransformationdescriptors.hh:61