dune-typetree 2.8.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
Dune::TypeTree::Experimental::Info::DepthVisitor Struct Reference

#include <dune/typetree/visitor.hh>

Inheritance diagram for Dune::TypeTree::Experimental::Info::DepthVisitor:
Inheritance graph

Public Member Functions

template<class Tree , class TreePath , class U >
auto leaf (Tree &&, TreePath, U u) const
 
template<typename T , typename TreePath , typename U >
auto pre (T &&t, TreePath treePath, const U &u) const
 Method for prefix tree traversal.
 
template<typename T , typename TreePath , typename U >
auto in (T &&t, TreePath treePath, const U &u) const
 Method for infix tree traversal.
 
template<typename T , typename TreePath , typename U >
auto post (T &&t, TreePath treePath, const U &u) const
 Method for postfix tree traversal.
 
template<typename T , typename TreePath , typename U >
auto leaf (T &&t, TreePath treePath, const U &u) const
 Method for leaf traversal.
 
template<typename T , typename Child , typename TreePath , typename ChildIndex , typename U >
auto beforeChild (T &&t, Child &&child, TreePath treePath, ChildIndex childIndex, const U &u) const
 Method for parent-child traversal.
 
template<typename T , typename Child , typename TreePath , typename ChildIndex , typename U >
auto afterChild (T &&t, Child &&child, TreePath treePath, ChildIndex childIndex, const U &u) const
 Method for child-parent traversal.
 

Static Public Attributes

static const TreePathType::Type treePathType = TreePathType::fullyStatic
 Use the static tree traversal algorithm.
 

Member Function Documentation

◆ afterChild()

template<typename T , typename Child , typename TreePath , typename ChildIndex , typename U >
auto Dune::TypeTree::Experimental::DefaultHybridVisitor::afterChild ( T &&  t,
Child &&  child,
TreePath  treePath,
ChildIndex  childIndex,
const U &  u 
) const
inlineinherited

Method for child-parent traversal.

This method gets called after visiting a child node.

Note
This method gets called even if the child node was not visited because the visitor chose not to do so.
Parameters
tThe parent node.
childThe child node that was visited last (if the visitor did not reject it).
treePathThe position of the parent node within the TypeTree.
childIndexThe index of the child node in relation to the parent node.
uThe carry value from previous visit.
Returns
The result of applying this visitor to u.

◆ beforeChild()

template<typename T , typename Child , typename TreePath , typename ChildIndex , typename U >
auto Dune::TypeTree::Experimental::DefaultHybridVisitor::beforeChild ( T &&  t,
Child &&  child,
TreePath  treePath,
ChildIndex  childIndex,
const U &  u 
) const
inlineinherited

Method for parent-child traversal.

This method gets called before visiting a child node.

Note
This method gets called even if the visitor decides not to visit the child in question.
Parameters
tThe parent node.
childThe child node that will (potentially) be visited next.
treePathThe position of the parent node within the TypeTree.
childIndexThe index of the child node in relation to the parent node.
uThe carry value from previous visit.
Returns
The result of applying this visitor to u.

◆ in()

template<typename T , typename TreePath , typename U >
auto Dune::TypeTree::Experimental::DefaultHybridVisitor::in ( T &&  t,
TreePath  treePath,
const U &  u 
) const
inlineinherited

Method for infix tree traversal.

This method gets called BETWEEN visits of children of a non-leaf node. That definition implies that this method will only be called for nodes with at least two children.

Parameters
tThe node to visit.
treePathThe position of the node within the TypeTree.
uThe carry value from previous visit.
Returns
The result of applying this visitor to u.

◆ leaf() [1/2]

template<typename T , typename TreePath , typename U >
auto Dune::TypeTree::Experimental::DefaultHybridVisitor::leaf ( T &&  t,
TreePath  treePath,
const U &  u 
) const
inlineinherited

Method for leaf traversal.

This method gets called when encountering a leaf node within the TypeTree.

Parameters
tThe node to visit.
treePathThe position of the node within the TypeTree.
uThe carry value from previous visit.
Returns
The result of applying this visitor to u.

◆ leaf() [2/2]

template<class Tree , class TreePath , class U >
auto Dune::TypeTree::Experimental::Info::DepthVisitor::leaf ( Tree &&  ,
TreePath  ,
u 
) const
inline

◆ post()

template<typename T , typename TreePath , typename U >
auto Dune::TypeTree::Experimental::DefaultHybridVisitor::post ( T &&  t,
TreePath  treePath,
const U &  u 
) const
inlineinherited

Method for postfix tree traversal.

This method gets called after all children of a non-leaf node have been visited.

Parameters
tThe node to visit.
treePathThe position of the node within the TypeTree.
uThe carry value from previous visit.
Returns
The result of applying this visitor to u.

◆ pre()

template<typename T , typename TreePath , typename U >
auto Dune::TypeTree::Experimental::DefaultHybridVisitor::pre ( T &&  t,
TreePath  treePath,
const U &  u 
) const
inlineinherited

Method for prefix tree traversal.

This method gets called when first encountering a non-leaf node and before visiting any of its children.

Parameters
tThe node to visit.
treePathThe position of the node within the TypeTree.
uThe carry value from previous visit.
Returns
The result of applying this visitor to u.

Member Data Documentation

◆ treePathType

const TreePathType::Type Dune::TypeTree::StaticTraversal::treePathType = TreePathType::fullyStatic
staticinherited

Use the static tree traversal algorithm.


The documentation for this struct was generated from the following file: