dune-typetree  3.0-dev
Namespaces | Classes | Typedefs | Functions
Dune::TypeTree Namespace Reference

Namespaces

 apply_to_tuple_policy
 Policies for the function apply_to_tuple().
 
 impl
 
 TreePathType
 

Classes

struct  AccumulateType
 Statically accumulate a type over the nodes of a TypeTree. More...
 
struct  AccumulateValue
 Statically accumulate a value over the nodes of a TypeTree. More...
 
struct  AdvancedFilter
 Base class for advanced filters. More...
 
struct  AdvancedFilterTag
 Tag describing an advanced filter that has full control over the construction of the list of FilterEntries. More...
 
struct  AlwaysVoid
 
struct  and_
 Statically combine two values of type result_type using &&. More...
 
class  CompositeNode
 Base class for composite nodes based on variadic templates. More...
 
struct  CompositeNodeTag
 Tag designating a composite node. More...
 
struct  DefaultPairVisitor
 Visitor interface and base class for visitors of pairs of TypeTrees. More...
 
struct  DefaultVisitor
 Visitor interface and base class for TypeTree visitors. More...
 
struct  DirectChildrenPairVisitor
 Convenience base class for visiting the direct children of a node pair. More...
 
struct  DirectChildrenVisitor
 Convenience base class for visiting the direct children of a node. More...
 
class  DynamicChildAccessors
 Mixin class providing methods for child access with run-time parameter. More...
 
struct  DynamicTraversal
 Mixin base class for visitors that only need a dynamic TreePath during traversal. More...
 
class  DynamicTreePath
 A TreePath that stores the path of a node as runtime information. More...
 
struct  evaluate_if_meta_function
 Meta function that evaluates its argument iff it inherits from meta_function. More...
 
class  Exception
 Base class for all TypeTree exceptions. More...
 
struct  filter
 Adapter class that takes a SimpleFilter, validated it and turns it into an AdvancedFilter. More...
 
class  FilteredCompositeNode
 Base class for composite nodes representing a filtered view on an underlying composite node. More...
 
struct  FilterEntry
 A filter entry describing the mapping of one child in the filtered node. More...
 
struct  FilterResult
 The result of a filter. More...
 
class  FixedCapacityStack
 
class  FixedCapacityStackView
 
struct  GenericCompositeNodeTransformation
 
struct  GenericCompositeNodeTransformationTemplate
 
struct  GenericLeafNodeTransformation
 
struct  GenericPowerNodeTransformation
 
struct  GenericPowerNodeTransformationTemplate
 
struct  has_implementation_tag
 
struct  has_implementation_tag_value
 
struct  has_node_tag
 
struct  has_node_tag_value
 
class  HybridTreePath
 A hybrid version of TreePath that supports both compile time and run time indices. More...
 
struct  index_pack
 Simple holder class for a template argument pack of indices. More...
 
struct  index_pack_builder
 TMP to build an index_pack containing the sequence 0,...,n-1. More...
 
struct  IndexFilter
 Filter class for FilteredCompositeNode that selects the children with the given indices. More...
 
struct  IsTreePath
 Check if type represents a tree path. More...
 
struct  lazy_evaluate
 Helper meta function to delay evaluation of F. More...
 
struct  lazy_identity
 Identity function. More...
 
class  LeafNode
 Base class for leaf nodes in a dune-typetree. More...
 
struct  LeafNodeTag
 Tag designating a leaf node. More...
 
struct  max
 Statically combine two values of type result_type by returning their maximum. More...
 
struct  meta_function
 Marker tag declaring a meta function. More...
 
struct  min
 Statically combine two values of type result_type by returning their minimum. More...
 
struct  minus
 Statically combine two values of type result_type using -. More...
 
struct  multiply
 Statically combine two values of type result_type using *. More...
 
struct  NodeInterface
 Interface for nodes in a dune-typetree. More...
 
struct  or_
 Statically combine two values of type result_type using ||. More...
 
struct  plus
 Statically combine two values of type result_type using +. More...
 
class  PowerNode
 Collect k instances of type T within a dune-typetree. More...
 
struct  PowerNodeTag
 Tag designating a power node. More...
 
class  ProxyNode
 Base class for nodes acting as a proxy for an existing node. More...
 
struct  ProxyNodeBase
 Tag-based dispatch to appropriate base class that provides necessary functionality. More...
 
struct  ProxyNodeBase< Node, CompositeNodeTag >
 ProxyNode base class for CompositeNode. More...
 
struct  ProxyNodeBase< Node, LeafNodeTag >
 ProxyNode base class for LeafNode. More...
 
struct  ProxyNodeBase< Node, PowerNodeTag >
 ProxyNode base class for PowerNode. More...
 
struct  SimpleCompositeNodeTransformation
 
struct  SimpleFilter
 Default simple filter that accepts any node and leaves its child structure unchanged. More...
 
struct  SimpleFilterTag
 Tag describing a simple filter that can only decide whether or not to include a single given child. More...
 
struct  SimpleLeafNodeTransformation
 
struct  SimplePowerNodeTransformation
 
class  StaticChildAccessors
 Mixin class providing methods for child access with compile-time parameter. More...
 
struct  StaticTraversal
 Mixin base class for visitors that require a static TreePath during traversal. More...
 
struct  TemplatizedGenericCompositeNodeTransformation
 
struct  TemplatizedGenericPowerNodeTransformation
 
struct  TransformTree
 Transform a TypeTree. More...
 
struct  TreeInfo
 Struct for obtaining some basic structural information about a TypeTree. More...
 
struct  TreePairVisitor
 Convenience base class for visiting an entire tree pair. More...
 
struct  TreePath
 
struct  TreePathBack
 
struct  TreePathBack< TreePath< j, k, l... > >
 
struct  TreePathBack< TreePath< k > >
 
struct  TreePathConcat
 
struct  TreePathConcat< TreePath< i... >, TreePath< k... > >
 
struct  TreePathFront
 
struct  TreePathFront< TreePath< k, i... > >
 
struct  TreePathPopBack
 
struct  TreePathPopBack< TreePath< j, k, l... >, i... >
 
struct  TreePathPopBack< TreePath< k >, i... >
 
struct  TreePathPopFront
 
struct  TreePathPopFront< TreePath< k, i... > >
 
struct  TreePathPushBack
 
struct  TreePathPushBack< TreePath< i... >, k >
 
struct  TreePathPushFront
 
struct  TreePathPushFront< TreePath< i... >, k >
 
struct  TreePathSize
 
struct  TreePathSize< TreePath< i... > >
 
struct  TreeVisitor
 Convenience base class for visiting the entire tree. More...
 
struct  tuple_index_pack_builder
 TMP to build an index_pack for all elements in the tuple. More...
 
struct  TypeAccumulationPolicy
 
struct  VisitDirectChildren
 Mixin base class for visitors that only want to visit the direct children of a node. More...
 
struct  VisitTree
 Mixin base class for visitors that want to visit the complete tree. More...
 

Typedefs

template<typename Node , std::size_t... indices>
using Child = typename impl::_Child< Node, indices... >::type
 Template alias for the type of a child node given by a list of child indices. More...
 
template<typename Node , typename TreePath >
using ChildForTreePath = typename impl::_ChildForTreePath< Node, TreePath >::type
 Template alias for the type of a child node given by a TreePath or a HybridTreePath type. More...
 
template<typename T >
using is_flat_index = typename impl::_is_flat_index< std::decay_t< T > >::type
 Type trait that determines whether T is a flat index in the context of child extraction. More...
 
template<typename Node >
using NodeTag = typename std::decay_t< Node >::NodeTag
 Returns the node tag of the given Node. More...
 
template<typename T >
using ImplementationTag = typename std::decay_t< T >::ImplementationTag
 Returns the implementation tag of the given Node. More...
 
template<typename Node >
using StaticDegree = std::integral_constant< std::size_t, degree(static_cast< std::decay_t< Node > * >(nullptr), NodeTag< std::decay_t< Node > >()) >
 Returns the statically known degree of the given Node type as a std::integral_constant. More...
 

Functions

template<typename Node , typename... Indices>
ImplementationDefined child (Node &&node, Indices... indices)
 Extracts the child of a node given by a sequence of compile-time and run-time indices. More...
 
template<typename Node , std::size_t... Indices>
ImplementationDefined child (Node &&node, TreePath< Indices... > treePath)
 Extracts the child of a node given by a static TreePath object. More...
 
template<typename Node , std::size_t... Indices>
ImplementationDefined childStorage (Node &&node, TreePath< Indices... > treePath)
 
template<typename Node , typename... Indices>
ImplementationDefined child (Node &&node, HybridTreePath< Indices... > treePath)
 Extracts the child of a node given by a HybridTreePath object. More...
 
template<typename Node >
std::size_t degree (const Node &node)
 Returns the degree of node as run time information. More...
 
template<typename Tree1 , typename Tree2 , typename Visitor >
void applyToTreePair (Tree1 &&tree1, Tree2 &&tree2, Visitor &&visitor)
 Apply visitor to a pair of TypeTrees. More...
 
template<typename SourceNode , typename Transformation , typename Tag >
void registerNodeTransformation (SourceNode *, Transformation *, Tag *)
 Register transformation descriptor to transform SourceNode with Transformation. More...
 
template<typename Tree , typename Visitor >
void applyToTree (Tree &&tree, Visitor &&visitor)
 Apply visitor to TypeTree. More...
 
template<typename ResultType , typename Tree , typename F , typename R >
ResultType reduceOverLeafs (const Tree &tree, F functor, R reduction, ResultType startValue)
 Calculate a quantity as a reduction over the leaf nodes of a TypeTree. More...
 
template<std::size_t... i>
constexpr std::size_t treePathSize (const TreePath< i... > &)
 Returns the size (number of components) of the given TreePath. More...
 
template<std::size_t... i>
void print_tree_path (std::ostream &os)
 
template<std::size_t k, std::size_t... i>
void print_tree_path (std::ostream &os)
 
template<std::size_t... i>
std::ostream & operator<< (std::ostream &os, const TreePath< i... > &tp)
 
template<typename... T>
constexpr HybridTreePath< T... > hybridTreePath (const T &... t)
 Constructs a new HybridTreePath from the given indices. More...
 
template<typename... T>
constexpr std::size_t treePathSize (const HybridTreePath< T... > &)
 Returns the size (number of components) of the given HybridTreePath. More...
 
template<std::size_t i, typename... T>
auto treePathEntry (const HybridTreePath< T... > &tp, index_constant< i >={}) -> typename std::decay< decltype(std::get< i >(tp._data))>::type
 Returns a copy of the i-th element of the HybridTreePath. More...
 
template<std::size_t i, typename... T>
std::size_t treePathIndex (const HybridTreePath< T... > &tp, index_constant< i >={})
 Returns the index value of the i-th element of the HybridTreePath. More...
 
template<typename... T, typename std::enable_if<(sizeof...(T) > 0>
auto back (const HybridTreePath< T... > &tp) -> decltype(treePathEntry< treePathSize(tp) -1 >(tp))
 Returns a copy of the last element of the HybridTreePath. More...
 
template<typename... T, typename std::enable_if<(sizeof...(T) > 0>
std::size_t backIndex (const HybridTreePath< T... > &tp)
 Returns the index value of the last element of the HybridTreePath. More...
 
template<typename... T>
auto front (const HybridTreePath< T... > &tp) -> decltype(treePathEntry< 0 >(tp))
 Returns a copy of the first element of the HybridTreePath. More...
 
template<typename... T>
std::size_t frontIndex (const HybridTreePath< T... > &tp)
 Returns the index value of the first element of the HybridTreePath. More...
 
template<typename... T>
HybridTreePath< T..., std::size_t > push_back (const HybridTreePath< T... > &tp, std::size_t i)
 Appends a run time index to a HybridTreePath. More...
 
template<std::size_t i, typename... T>
HybridTreePath< T..., index_constant< i > > push_back (const HybridTreePath< T... > &tp, index_constant< i > i_={})
 Appends a compile time index to a HybridTreePath. More...
 
template<typename... T>
HybridTreePath< std::size_t, T... > push_front (const HybridTreePath< T... > &tp, std::size_t element)
 Prepends a run time index to a HybridTreePath. More...
 
template<std::size_t i, typename... T>
HybridTreePath< index_constant< i >, T... > push_front (const HybridTreePath< T... > &tp, index_constant< i > _i={})
 Prepends a compile time index to a HybridTreePath. More...
 
template<typename... T>
std::ostream & operator<< (std::ostream &os, const HybridTreePath< T... > &tp)
 Dumps a HybridTreePath to a stream. More...
 
template<typename T >
T * declptr ()
 Helper function for generating a pointer to a value of type T in an unevaluated operand setting. More...
 
template<class T >
constexpr auto isTreePath (const T &) -> IsTreePath< T >
 Check if given object represents a tree path. More...
 
template<typename tuple >
tuple_index_pack_builder< tuple >::type tuple_indices (const tuple &t)
 Generate an index_pack for the tuple t. More...
 
template<std::size_t n>
index_pack_builder< n >::type index_range (std::integral_constant< std::size_t, n >={})
 Generate an index_pack with the values {0, 1, ..., n-1}. More...
 
template<typename... Args>
void discard (Args &&... args)
 No-op function to make calling a function on a variadic template argument pack legal C++. More...
 
template<typename T , typename F , typename Policy >
void apply_to_tuple (T &&t, F &&f, Policy=apply_to_tuple_policy::default_policy())
 Apply a functor to each element of a std::tuple. More...
 

Function Documentation

◆ declptr()

template<typename T >
T* Dune::TypeTree::declptr ( )

Helper function for generating a pointer to a value of type T in an unevaluated operand setting.

◆ isTreePath()

template<class T >
constexpr auto Dune::TypeTree::isTreePath ( const T &  ) -> IsTreePath<T>
constexpr

Check if given object represents a tree path.

Template Parameters
TCheck if this type represents a tree path
Returns
std::true_type if argument is a tree path and std::false_type if not