Dune Core Modules (2.8.0)

Dune::TypeTree::DirectChildrenPairVisitor Struct Reference

Convenience base class for visiting the direct children of a node pair. More...

#include <dune/typetree/visitor.hh>

Public Member Functions

template<typename T1 , typename T2 , typename TreePath >
void pre (T1 &&t1, T2 &&t2, TreePath treePath) const
 Method for prefix tree traversal. More...
 
template<typename T1 , typename T2 , typename TreePath >
void in (T1 &&t1, T2 &&t2, TreePath treePath) const
 Method for infix tree traversal. More...
 
template<typename T1 , typename T2 , typename TreePath >
void post (T1 &&t1, T2 &&t2, TreePath treePath) const
 Method for postfix traversal. More...
 
template<typename T1 , typename T2 , typename TreePath >
void leaf (T1 &&t1, T2 &&t2, TreePath treePath) const
 Method for leaf traversal. More...
 
template<typename T1 , typename Child1 , typename T2 , typename Child2 , typename TreePath , typename ChildIndex >
void beforeChild (T1 &&t1, Child1 &&child1, T2 &&t2, Child2 &&child2, TreePath treePath, ChildIndex childIndex) const
 Method for parent-child traversal. More...
 
template<typename T1 , typename Child1 , typename T2 , typename Child2 , typename TreePath , typename ChildIndex >
void afterChild (T1 &&t1, Child1 &&child1, T2 &&t2, Child2 &&child2, TreePath treePath, ChildIndex childIndex) const
 Method for child-parent traversal. More...
 

Detailed Description

Convenience base class for visiting the direct children of a node pair.

Member Function Documentation

◆ afterChild()

template<typename T1 , typename Child1 , typename T2 , typename Child2 , typename TreePath , typename ChildIndex >
void Dune::TypeTree::DefaultPairVisitor::afterChild ( T1 &&  t1,
Child1 &&  child1,
T2 &&  t2,
Child2 &&  child2,
TreePath  treePath,
ChildIndex  childIndex 
) const
inlineinherited

Method for child-parent traversal.

This method gets called after visiting a child node.

Note
This method gets called even if the visitor decides not to visit the child in question.
Parameters
t1The node of the first tree to visit.
child1The child of t1 to visit.
t2The node of the second tree to visit.
child2The child of t2 to visit.
treePathThe position of the parent nodes within the TypeTree.
childIndexThe index of the child nodes in relation to the parent nodes.

◆ beforeChild()

template<typename T1 , typename Child1 , typename T2 , typename Child2 , typename TreePath , typename ChildIndex >
void Dune::TypeTree::DefaultPairVisitor::beforeChild ( T1 &&  t1,
Child1 &&  child1,
T2 &&  t2,
Child2 &&  child2,
TreePath  treePath,
ChildIndex  childIndex 
) 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
t1The node of the first tree to visit.
child1The child of t1 to visit.
t2The node of the second tree to visit.
child2The child of t2 to visit.
treePathThe position of the parent nodes within the TypeTree.
childIndexThe index of the child nodes in relation to the parent nodes.

◆ in()

template<typename T1 , typename T2 , typename TreePath >
void Dune::TypeTree::DefaultPairVisitor::in ( T1 &&  t1,
T2 &&  t2,
TreePath  treePath 
) 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
t1The node of the first tree to visit.
t2The node of the second tree to visit.
treePathThe position of the node within the TypeTree.

◆ leaf()

template<typename T1 , typename T2 , typename TreePath >
void Dune::TypeTree::DefaultPairVisitor::leaf ( T1 &&  t1,
T2 &&  t2,
TreePath  treePath 
) const
inlineinherited

Method for leaf traversal.

This method gets called when encountering a leaf node within the pair of TypeTrees.

Attention
Since the two TypeTrees are not required to be exactly identical, it is only guaranteed that at least one of the nodes is a leaf node, not both.
Parameters
t1The node of the first tree to visit.
t2The node of the second tree to visit.
treePathThe position of the node within the TypeTree.

◆ post()

template<typename T1 , typename T2 , typename TreePath >
void Dune::TypeTree::DefaultPairVisitor::post ( T1 &&  t1,
T2 &&  t2,
TreePath  treePath 
) const
inlineinherited

Method for postfix traversal.

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

Parameters
t1The node of the first tree to visit.
t2The node of the second tree to visit.
treePathThe position of the node within the TypeTree.

◆ pre()

template<typename T1 , typename T2 , typename TreePath >
void Dune::TypeTree::DefaultPairVisitor::pre ( T1 &&  t1,
T2 &&  t2,
TreePath  treePath 
) 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
t1The node of the first tree to visit.
t2The node of the second tree to visit.
treePathThe position of the node within the TypeTree.

The documentation for this struct was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)