Dune Core Modules (2.9.0)
Modules | |
Traversal | |
Child Extraction | |
Nodes | |
TreePath | |
Transformation | |
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... | |
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