DUNE PDELab (2.8)
Modules | |
Traversal | |
Child Extraction | |
Nodes | |
TreePath | |
Transformation | |
Namespaces | |
namespace | Dune::TypeTree::apply_to_tuple_policy |
Policies for the function apply_to_tuple(). | |
Classes | |
struct | Dune::TypeTree::TreeInfo< Tree, Tag > |
Struct for obtaining some basic structural information about a TypeTree. More... | |
Functions | |
template<class Tree , class LeafToValue > | |
auto | Dune::TypeTree::makeTreeContainer (const Tree &tree, LeafToValue &&leafToValue) |
Create container havin the same structure as the given tree. More... | |
template<class Value , class Tree > | |
auto | Dune::TypeTree::makeTreeContainer (const Tree &tree) |
Create container havin the same structure as the given tree. More... | |
template<typename... Args> | |
void | Dune::TypeTree::discard (Args &&... args) |
No-op function to make calling a function on a variadic template argument pack legal C++. | |
template<typename T , typename F , typename Policy > | |
void | Dune::TypeTree::apply_to_tuple (T &&t, F &&f, Policy=apply_to_tuple_policy::default_policy()) |
Apply a functor to each element of a std::tuple. | |
Detailed Description
Function Documentation
◆ makeTreeContainer() [1/2]
auto Dune::TypeTree::makeTreeContainer | ( | const Tree & | tree | ) |
Create container havin the same structure as the given tree.
This class allows to create a nested hybrid container having the same structure as a given type tree. Power nodes are represented as std::array's while composite nodes are represented as Dune::TupleVector's. The stored values for the leaf nodes are of the given type Value. For convenience the created container is not returned directly. Instead, the returned object stores the container and provides operator[] access using a HybridTreePath.
- Template Parameters
-
Value Type of the values to be stored for the leafs. Should be default constructible.
- Parameters
-
leafToValue A predicate used to generate the stored values for the leaves
- Returns
- A container matching the tree structure
References Dune::TypeTree::makeTreeContainer().
Referenced by Dune::TypeTree::makeTreeContainer().
◆ makeTreeContainer() [2/2]
auto Dune::TypeTree::makeTreeContainer | ( | const Tree & | tree, |
LeafToValue && | leafToValue | ||
) |
Create container havin the same structure as the given tree.
This class allows to create a nested hybrid container having the same structure as a given type tree. Power nodes are represented as std::array's while composite nodes are represented as Dune::TupleVector's. The stored values for the leaf nodes are creating using a given predicate. For convenience the created container is not returned directly. Instead, the returned object stores the container and provides operator[] access using a HybridTreePath.
- Parameters
-
tree The tree which should be mapper to a container leafToValue A predicate used to generate the stored values for the leaves
- Returns
- A container matching the tree structure
![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)