6#ifndef DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
7#define DUNE_TYPETREE_GENERICTRANSFORMATIONDESCRIPTORS_HH
15#include <dune/common/exceptions.hh>
26 template<
typename SourceNode,
typename Transformation,
typename TransformedNode>
47 return std::make_shared<transformed_type>(s,t);
53 template<
typename SourceNode,
typename Transformation,
template<
typename Child>
class TransformedNodeTemplate>
62 typedef typename TransformedNodeTemplate<TC>::type
type;
82 return std::make_shared<typename result<TC>::type>(s,t,children);
88 template<
typename SourceNode,
typename Transformation,
template<
typename,
typename,std::
size_t>
class TransformedNode>
92 GenericPowerNodeTransformationTemplate<SourceNode,
94 TransformedNode>::template result
99 template<
typename SourceNode,
typename Transformation,
template<
typename Child>
class TransformedNodeTemplate>
105 template<
typename TC>
108 typedef typename TransformedNodeTemplate<TC>::type
type;
112 template<
typename TC>
113 static typename result<TC>::type transform(
const SourceNode& s,
const Transformation& t,
const std::vector<std::shared_ptr<TC>>& children)
118 template<
typename TC>
119 static typename result<TC>::type transform(std::shared_ptr<const SourceNode> s,
const Transformation& t,
const std::vector<std::shared_ptr<TC>>& children)
124 template<
typename TC>
127 return std::make_shared<typename result<TC>::type>(s,t,children);
133 template<
typename SourceNode,
typename Transformation,
template<
typename,
typename>
class TransformedNode>
137 GenericDynamicPowerNodeTransformationTemplate<SourceNode,
139 TransformedNode>::template result
144 template<
typename SourceNode,
typename Transformation,
template<
typename...>
class TransformedNodeTemplate>
150 template<
typename... TC>
157 template<
typename... TC>
158 static typename result<TC...>::type
transform(
const SourceNode& s,
const Transformation& t, std::shared_ptr<TC>... children)
163 template<
typename... TC>
164 static typename result<TC...>::type
transform(std::shared_ptr<const SourceNode> s,
const Transformation& t, std::shared_ptr<TC>... children)
169 template<
typename... TC>
170 static typename result<TC...>::storage_type
transform_storage(std::shared_ptr<const SourceNode> s,
const Transformation& t, std::shared_ptr<TC>... children)
172 return std::make_shared<
typename result<TC...>::type>(s,t,children...);
178 template<
typename SourceNode,
typename Transformation,
template<
typename,
typename...>
class TransformedNode>
182 GenericCompositeNodeTransformationTemplate<SourceNode,
184 TransformedNode>::template result
decltype(Node::degree()) StaticDegree
Returns the statically known degree of the given Node type as a std::integral_constant.
Definition nodeinterface.hh:107
Definition accumulate_static.hh:16
Definition generictransformationdescriptors.hh:28
TransformedNode transformed_type
Definition generictransformationdescriptors.hh:32
std::shared_ptr< transformed_type > transformed_storage_type
Definition generictransformationdescriptors.hh:33
static transformed_type transform(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition generictransformationdescriptors.hh:40
static const bool recursive
Definition generictransformationdescriptors.hh:30
static transformed_storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition generictransformationdescriptors.hh:45
static transformed_type transform(const SourceNode &s, const Transformation &t)
Definition generictransformationdescriptors.hh:35
Definition generictransformationdescriptors.hh:55
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 >::degree > &children)
Definition generictransformationdescriptors.hh:80
static const bool recursive
Definition generictransformationdescriptors.hh:57
static result< TC >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition generictransformationdescriptors.hh:74
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::degree > &children)
Definition generictransformationdescriptors.hh:68
Definition generictransformationdescriptors.hh:61
TransformedNodeTemplate< TC >::type type
Definition generictransformationdescriptors.hh:62
static const std::size_t degree
Definition generictransformationdescriptors.hh:64
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:63
Definition generictransformationdescriptors.hh:96
Definition generictransformationdescriptors.hh:101
static result< TC >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:119
static const bool recursive
Definition generictransformationdescriptors.hh:103
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:113
static result< TC >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, const std::vector< std::shared_ptr< TC > > &children)
Definition generictransformationdescriptors.hh:125
Definition generictransformationdescriptors.hh:107
TransformedNodeTemplate< TC >::type type
Definition generictransformationdescriptors.hh:108
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:109
Definition generictransformationdescriptors.hh:141
Definition generictransformationdescriptors.hh:146
static result< TC... >::type transform(const SourceNode &s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:158
static result< TC... >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:170
static result< TC... >::type transform(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >... children)
Definition generictransformationdescriptors.hh:164
static const bool recursive
Definition generictransformationdescriptors.hh:148
Definition generictransformationdescriptors.hh:152
TransformedNodeTemplate< TC... >::type type
Definition generictransformationdescriptors.hh:153
std::shared_ptr< type > storage_type
Definition generictransformationdescriptors.hh:154
Definition generictransformationdescriptors.hh:186