Loading...
Searching...
No Matches
VisitNodeType< NodeT, OpT, Derived > Struct Template Reference

`#include <openvdb_ax/ast/Scanners.h>`

Inheritance diagram for VisitNodeType< NodeT, OpT, Derived >:

## Public Types

using | VisitorT
using | NodeType
| Templated conditional which resolves to a const NodeT if ConstVisit is true, or a non-const NodeT if ConstVisit is false.

## Public Member Functions

bool | visitNodeHierarchies () const
| VisitNodeType (const OpT &op)
| ~VisitNodeType ()=default
bool | visit (const NodeT *node)
std::conditional< std::is_same< void, void >::value, VisitNodeType< NodeT, OpT >, void >::type & | derived ()
| Accesses the derived class by static casting the current object. Assumes use of the Curiously Recursive Template Pattern (CRTP).
Options
bool | postOrderNodes () const
| Default behavior option. If true, this results in post-order traversal, where node children are traversed and visited before their parent node. If false, this results in pre-order traversal, where by the current node is visited before the node's children.
bool | reverseChildVisits () const
| Default behavior option. Reverses the traversal order of child nodes. If true, child nodes are accessed from last to first index .i.e. Node::children() -> 0. If false, child nodes are accessed from first to last .i.e. 0 -> Node::children().
bool | reverseHierarchyVisits () const

Default behavior option. Reverses the traversal order of node hierarchies. If true, hierarchical visits start at the very top of their inheritance structure (always a Node AST node) and visit downwards until the lowest derived concrete node is reached. If false, hierarchical visits start at the lowest derived concrete node and visit upwards until the very top of their inheritance structure (always a Node AST node) is reached.

Traversals
bool | traverse (NodeType< ast::Tree > *tree)
| Default traversals for a given concrete AST node type.
Visits
bool | visit (NodeType< ast::Node > *)
| Visits for abstract (pure-virtual) Node types.

## Member Typedef Documentation

## NodeType

using NodeType

inherited

Templated conditional which resolves to a const NodeT if ConstVisit is true, or a non-const NodeT if ConstVisit is false.

## VisitorT

template<typename NodeT, typename OpT, typename Derived = void>

using VisitorT

Initial value:
typename std::conditional<
std::is_same<Derived, void>::value,
VisitNodeType<NodeT, OpT>,
Derived>::type
openvdb::v10_0::ax::ast::VisitNodeType::VisitNodeType
VisitNodeType(const OpT &op)
Definition Scanners.h:184

## Constructor & Destructor Documentation

## VisitNodeType()

template<typename NodeT, typename OpT, typename Derived = void>

VisitNodeType | ( | const OpT & | op | ) |

inline

## ~VisitNodeType()

template<typename NodeT, typename OpT, typename Derived = void>

~VisitNodeType | ( |  | ) |

default

## Member Function Documentation

## derived()

std::conditional< std::is_same< void, void >::value, VisitNodeType< NodeT, OpT >, void >::type & derived | ( |  | ) |

inline inherited

Accesses the derived class by static casting the current object. Assumes use of the Curiously Recursive Template Pattern (CRTP).

## postOrderNodes()

bool postOrderNodes | ( |  | ) | const

inline inherited

Default behavior option. If true, this results in post-order traversal, where node children are traversed and visited before their parent node. If false, this results in pre-order traversal, where by the current node is visited before the node's children.

Post-order traversal (for each node):

1. Traverse all children.
2. Visit the current node. Pre-order traversal (for each node):

1. Visit the current node.
2. Traverse all children.

## reverseChildVisits()

bool reverseChildVisits | ( |  | ) | const

inline inherited

Default behavior option. Reverses the traversal order of child nodes. If true, child nodes are accessed from last to first index .i.e. Node::children() -> 0. If false, child nodes are accessed from first to last .i.e. 0 -> Node::children().

## reverseHierarchyVisits()

bool reverseHierarchyVisits | ( |  | ) | const

inline inherited

Default behavior option. Reverses the traversal order of node hierarchies. If true, hierarchical visits start at the very top of their inheritance structure (always a Node AST node) and visit downwards until the lowest derived concrete node is reached. If false, hierarchical visits start at the lowest derived concrete node and visit upwards until the very top of their inheritance structure (always a Node AST node) is reached.

Note
  Has no effect if visitNodeHierarchies() is false

## traverse()

bool traverse | ( | NodeType< ast::Tree > * | tree | ) |

inline inherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## visit() [1/2]

template<typename NodeT, typename OpT, typename Derived = void>

bool visit | ( | const NodeT * | node | ) |

inline

## visit() [2/2]

bool visit | ( | NodeType< ast::Node > * |  | ) |

inline inherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## visitNodeHierarchies()

template<typename NodeT, typename OpT, typename Derived = void>

bool visitNodeHierarchies | ( |  | ) | const

inline