4 #ifndef DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH 5 #define DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH 11 #include <dune/common/exceptions.hh> 22 template<
typename SourceNode,
typename Transformation,
typename TransformedNode>
31 static transformed_type
transform(
const SourceNode& s,
const Transformation& t)
36 static transformed_storage_type
transform_storage(std::shared_ptr<const SourceNode> s,
const Transformation& t)
38 return std::make_shared<transformed_type>();
44 template<
typename SourceNode,
typename Transformation,
template<
typename Child, std::
size_t>
class TransformedNode>
53 typedef TransformedNode<TC, SourceNode::CHILDREN>
type;
66 return std::make_shared<typename result<TC>::type>(children);
72 template<
typename SourceNode,
typename Transformation,
template<
typename...>
class TransformedNode>
78 template<
typename... TC>
81 typedef TransformedNode<TC...>
type;
85 template<
typename... TC>
86 static typename result<TC...>::type
transform(
const SourceNode& s,
const Transformation& t, std::shared_ptr<TC>... children)
91 template<
typename... TC>
92 static typename result<TC...>::storage_type
transform_storage(std::shared_ptr<const SourceNode> s,
const Transformation& t, std::shared_ptr<TC>... children)
94 return std::make_shared<
typename result<TC...>::type>(children...);
104 #endif // DUNE_TYPETREE_SIMPLETRANSFORMATIONDESCRIPTORS_HH TransformedNode transformed_type
Definition: simpletransformationdescriptors.hh:28
static transformed_storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t)
Definition: simpletransformationdescriptors.hh:36
TransformedNode< TC... > type
Definition: simpletransformationdescriptors.hh:81
Definition: simpletransformationdescriptors.hh:73
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: simpletransformationdescriptors.hh:64
static transformed_type transform(const SourceNode &s, const Transformation &t)
Definition: simpletransformationdescriptors.hh:31
Definition: simpletransformationdescriptors.hh:23
std::shared_ptr< type > storage_type
Definition: simpletransformationdescriptors.hh:54
static result< TC... >::type transform(const SourceNode &s, const Transformation &t, std::shared_ptr< TC >...children)
Definition: simpletransformationdescriptors.hh:86
std::shared_ptr< transformed_type > transformed_storage_type
Definition: simpletransformationdescriptors.hh:29
Definition: simpletransformationdescriptors.hh:79
static const bool recursive
Definition: simpletransformationdescriptors.hh:26
TransformedNode< TC, SourceNode::CHILDREN > type
Definition: simpletransformationdescriptors.hh:53
std::shared_ptr< type > storage_type
Definition: simpletransformationdescriptors.hh:82
Definition: accumulate_static.hh:12
Definition: simpletransformationdescriptors.hh:51
static result< TC >::type transform(const SourceNode &s, const Transformation &t, const std::array< std::shared_ptr< TC >, result< TC >::type::CHILDREN > &children)
Definition: simpletransformationdescriptors.hh:58
static result< TC... >::storage_type transform_storage(std::shared_ptr< const SourceNode > s, const Transformation &t, std::shared_ptr< TC >...children)
Definition: simpletransformationdescriptors.hh:92
Definition: simpletransformationdescriptors.hh:45