A factory class creating a hybrid container compatible with a type tree. More...
#include <TreeContainer.hpp>
Public Member Functions | |
ContainerFactory (NodeToValue nodeToValue) | |
Create ContainerFactory. More... | |
template<class Node > | |
auto | operator() (Node const &node) const |
Return a container for storing the node content. | |
template<class Node , class Container > | |
auto | makeInnerNodeStorage (Node const &node, Container &&container) const |
A factory class creating a hybrid container compatible with a type 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. Once created, the factory provides an operator() creating the container for the tree given as argument.
NodeToValue | Type of a predicate that determines the stored values at the leafs |
|
inline |
Create ContainerFactory.
The given predicate will be stored by value.
A | predicate used to generate the stored values for the leaves |