dune-typetree
2.4-dev
|
![]() |
Classes | |
struct | Dune::TypeTree::extract_child_type< Node, TreePath > |
Extract the type of the child of Node at position TreePath. More... | |
Functions | |
template<typename Node , typename TreePath > | |
ImplementationDefined & | Dune::TypeTree::extract_child (Node &node, Treepath tp) |
Extract the child of a node located at tp (non-const version). More... | |
template<typename Node , typename TreePath > | |
const ImplementationDefined & | Dune::TypeTree::extract_child (const Node &node, Treepath tp) |
Extract the child of a node located at tp (const version). More... | |
template<typename Node , typename TreePath > | |
ImplementationDefined | Dune::TypeTree::extract_child_storage (Node &node, Treepath tp) |
template<typename Node , typename TreePath > | |
ImplementationDefined | Dune::TypeTree::extract_child_storage (const Node &node, Treepath tp) |
Utility functions and metafunctions for extracting children from a TypeTree.
ImplementationDefined& Dune::TypeTree::extract_child | ( | Node & | node, |
Treepath | tp | ||
) |
Extract the child of a node located at tp (non-const version).
Use this function to extract a (possibly indirect) child of a TypeTree node.
Example:
extract_child(node,Dune::TypeTree::TreePath<2,3,0>())
returns the first child of the fourth child of the third child of node.
node | The node from which to extract the child. |
tp | The path into the tree leading to the child. Note that the actual instance is not used at all by this function, only the type of the parameter. |
TreePath | A TreePath instantiation which statically encodes the path to the child. |
const ImplementationDefined& Dune::TypeTree::extract_child | ( | const Node & | node, |
Treepath | tp | ||
) |
Extract the child of a node located at tp (const version).
Use this function to extract a (possibly indirect) child of a TypeTree node.
Example:
extract_child(node,Dune::TypeTree::TreePath<2,3,0>())
returns the first child of the fourth child of the third child of node.
node | The node from which to extract the child. |
tp | The path into the tree leading to the child. Note that the actual instance is not used at all by this function, only the type of the parameter. |
TreePath | A TreePath instantiation which statically encodes the path to the child. |
ImplementationDefined Dune::TypeTree::extract_child_storage | ( | Node & | node, |
Treepath | tp | ||
) |
Extract the storage for the child of a node located at tp (non-const version). Use this function to extract the storage (usually a shared_ptr) of a (possibly indirect) child of a TypeTree node.
Example:
extract_child_storage(node,Dune::TypeTree::TreePath<2,3,0>())
returns the first child of the fourth child of the third child of node.
node | The node from which to extract the child. |
tp | The path into the tree leading to the child. Note that the actual instance is not used at all by this function, only the type of the parameter. |
TreePath | A TreePath instantiation which statically encodes the path to the child. |
ImplementationDefined Dune::TypeTree::extract_child_storage | ( | const Node & | node, |
Treepath | tp | ||
) |
Extract the storage for the child of a node located at tp (const version). Use this function to extract the const storage (usually a shared_ptr) of a (possibly indirect) child of a TypeTree node.
Example:
extract_child_storage(node,Dune::TypeTree::TreePath<2,3,0>())
returns the first child of the foruth child of the third child of node.
node | The node from which to extract the child. |
tp | The path into the tree leading to the child. Note that the actual instance is not used at all by this function, only the type of the parameter. |
TreePath | A TreePath instantiation which statically encodes the path to the child. |