4 #ifndef DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
5 #define DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
12 #include <dune/common/exceptions.hh>
23 template<
typename SourceNode,
typename Transformation,
typename TransformedNode>
32 static transformed_type
transform(
const SourceNode& s,
const Transformation& t)
37 static transformed_type
transform(std::shared_ptr<const SourceNode> s,
const Transformation& t)
42 static transformed_storage_type
transform_storage(std::shared_ptr<const SourceNode> s,
const Transformation& t)
44 return std::make_shared<transformed_type>(s,t);
50 template<
typename SourceNode,
typename Transformation,
template<
typename Child>
class TransformedNodeTemplate>
59 typedef typename TransformedNodeTemplate<TC>::type
type;
64 static typename result<TC>::type
transform(
const SourceNode& s,
const Transformation& t,
const std::array<std::shared_ptr<TC>,result<TC>::type::CHILDREN>& children)
70 static typename result<TC>::type
transform(std::shared_ptr<const SourceNode> s,
const Transformation& t,
const std::array<std::shared_ptr<TC>,result<TC>::type::CHILDREN>& children)
76 static typename result<TC>::storage_type
transform_storage(std::shared_ptr<const SourceNode> s,
const Transformation& t,
const std::array<std::shared_ptr<TC>,result<TC>::type::CHILDREN>& children)
78 return std::make_shared<typename result<TC>::type>(s,t,children);
84 template<
typename SourceNode,
typename Transformation,
template<
typename,
typename,std::
size_t>
class TransformedNode>
88 GenericPowerNodeTransformationTemplate<SourceNode,
90 TransformedNode>::template result
95 template<
typename SourceNode,
typename Transformation,
template<
typename...>
class TransformedNodeTemplate>
101 template<
typename... TC>
108 template<
typename... TC>
109 static typename result<TC...>::type
transform(
const SourceNode& s,
const Transformation& t, std::shared_ptr<TC>... children)
114 template<
typename... TC>
115 static typename result<TC...>::type
transform(std::shared_ptr<const SourceNode> s,
const Transformation& t, std::shared_ptr<TC>... children)
120 template<
typename... TC>
121 static typename result<TC...>::storage_type
transform_storage(std::shared_ptr<const SourceNode> s,
const Transformation& t, std::shared_ptr<TC>... children)
123 return std::make_shared<
typename result<TC...>::type>(s,t,children...);
129 template<
typename SourceNode,
typename Transformation,
template<
typename,
typename...>
class TransformedNode>
133 GenericCompositeNodeTransformationTemplate<SourceNode,
135 TransformedNode>::template result
144 #endif // DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
Definition: generictransformationdescriptors.hh:24
static result< TC...>::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >...children)
Definition: generictransformationdescriptors.hh:115
Definition: accumulate_static.hh:12
static result< TC >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::type::CHILDREN > &children)
Definition: generictransformationdescriptors.hh:70
Definition: generictransformationdescriptors.hh:96
Definition: generictransformationdescriptors.hh:102
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::type::CHILDREN > &children)
Definition: generictransformationdescriptors.hh:64
TransformedNodeTemplate< TC...>::type type
Definition: generictransformationdescriptors.hh:104
Definition: generictransformationdescriptors.hh:51
static transformed_type transform(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition: generictransformationdescriptors.hh:37
std::shared_ptr< transformed_type > transformed_storage_type
Definition: generictransformationdescriptors.hh:30
static transformed_storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition: generictransformationdescriptors.hh:42
static result< TC...>::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >...children)
Definition: generictransformationdescriptors.hh:121
Definition: generictransformationdescriptors.hh:130
TransformedNode transformed_type
Definition: generictransformationdescriptors.hh:29
static const bool recursive
Definition: generictransformationdescriptors.hh:99
static const bool recursive
Definition: generictransformationdescriptors.hh:27
static result< TC...>::type transform(const SourceNode &s, const Transformation &t, std::shared_ptr< TC >...children)
Definition: generictransformationdescriptors.hh:109
Definition: generictransformationdescriptors.hh:85
static const result_type result
Definition: accumulate_static.hh:109
Definition: generictransformationdescriptors.hh:57
std::shared_ptr< type > storage_type
Definition: generictransformationdescriptors.hh:60
std::shared_ptr< type > storage_type
Definition: generictransformationdescriptors.hh:105
static transformed_type transform(const SourceNode &s, const Transformation &t)
Definition: generictransformationdescriptors.hh:32
TransformedNodeTemplate< TC >::type type
Definition: generictransformationdescriptors.hh:59
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::type::CHILDREN > &children)
Definition: generictransformationdescriptors.hh:76
static const bool recursive
Definition: generictransformationdescriptors.hh:54