dune-functions 2.8.0
Loading...
Searching...
No Matches
Dune::Functions::UniformNodeVisitor< SimpleNodeVisitorImp, leafOnly > Struct Template Reference

Mixin for visitors that should apply the same action on all nodes. More...

#include <dune/functions/common/treedata.hh>

Inheritance diagram for Dune::Functions::UniformNodeVisitor< SimpleNodeVisitorImp, leafOnly >:
Inheritance graph

Public Member Functions

template<typename Node , typename TreePath , typename std::enable_if<(not leafOnly) and(not Node::isLeaf), int >::type = 0>
void pre (Node &node, TreePath treePath)
 
template<typename Node , typename TreePath , typename std::enable_if<(leafOnly) and(not Node::isLeaf), int >::type = 0>
void pre (Node &node, TreePath treePath)
 
template<typename Node , typename TreePath >
void leaf (Node &node, TreePath treePath)
 
void pre (T &&t, TreePath treePath) const
 
void in (T &&t, TreePath treePath) const
 
void post (T &&t, TreePath treePath) const
 
void leaf (T &&t, TreePath treePath) const
 
void beforeChild (T &&t, Child &&child, TreePath treePath, ChildIndex childIndex) const
 
void afterChild (T &&t, Child &&child, TreePath treePath, ChildIndex childIndex) const
 

Static Public Attributes

static const TreePathType::Type treePathType
 

Detailed Description

template<class SimpleNodeVisitorImp, bool leafOnly>
struct Dune::Functions::UniformNodeVisitor< SimpleNodeVisitorImp, leafOnly >

Mixin for visitors that should apply the same action on all nodes.

By deriving from this you only have to implement apply(node,treepath) in the derived class. This will be used for pre(...) and leaf(...).

Template Parameters
DerivedType of derived class implementing apply(node,treepath)
leafOnlyFlag to enable leaf only traversal

Member Function Documentation

◆ leaf()

template<class SimpleNodeVisitorImp , bool leafOnly>
template<typename Node , typename TreePath >
void Dune::Functions::UniformNodeVisitor< SimpleNodeVisitorImp, leafOnly >::leaf ( Node &  node,
TreePath  treePath 
)
inline

◆ pre() [1/2]

template<class SimpleNodeVisitorImp , bool leafOnly>
template<typename Node , typename TreePath , typename std::enable_if<(not leafOnly) and(not Node::isLeaf), int >::type = 0>
void Dune::Functions::UniformNodeVisitor< SimpleNodeVisitorImp, leafOnly >::pre ( Node &  node,
TreePath  treePath 
)
inline

◆ pre() [2/2]

template<class SimpleNodeVisitorImp , bool leafOnly>
template<typename Node , typename TreePath , typename std::enable_if<(leafOnly) and(not Node::isLeaf), int >::type = 0>
void Dune::Functions::UniformNodeVisitor< SimpleNodeVisitorImp, leafOnly >::pre ( Node &  node,
TreePath  treePath 
)
inline

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