Traversal of CoDiPack expressions. More...
#include <traversalLogic.hpp>
Public Types | |
using | Impl = T_Impl |
See TraversalLogic. | |
Public Member Functions | |
Impl & | cast () |
Cast to the implementation. | |
template<typename Node , typename... Args> | |
void | eval (NodeInterface< Node > const &node, Args &&... args) |
Start the evaluation of the logic on the given expression. | |
Interface definition | |
template<typename Node , typename... Args> | |
void | node (Node const &node, Args &&... args) |
Called for each node in the expression. | |
template<typename Node , typename... Args> | |
void | leaf (Node const &node, Args &&... args) |
Called for all leaf nodes in the expression. | |
template<size_t ChildNumber, typename Child , typename Root , typename... Args> | |
void | link (Child const &child, Root const &root, Args &&... args) |
Called for all links in the expression. | |
Protected Member Functions | |
template<typename Node , typename... Args> | |
void | toLinks (Node const &node, Args &&... args) |
Helper method which calls forEachLink on the node. | |
template<typename Node , typename... Args> | |
void | toNode (Node const &node, Args &&... args) |
Helper method to distinguish between leaf nodes and normal nodes. | |
Traversal of CoDiPack expressions.
For a detailed explanation of the traversal structure please see Expression traversal.
Implementing classes can have members which store information required for the traversal.
T_Impl | Class implementing this interface. |
Called for all leaf nodes in the expression.
Default: Does nothing.
|
inline |
Called for all links in the expression.
Implementations can call the toNode method in order to evaluate either leaf or node depending on the child.
Default: Call the child node and forward all arguments.
Called for each node in the expression.
Implementations can call the toLinks method in order to evaluate all links of the node.
Default: Call each link of the node and forward all arguments.