Template Class StructuralWalkEngine#

Inheritance Relationships#

Base Type#

  • public Parent

Class Documentation#

template<typename Parent, WalkOrder order, typename ...Callbacks>
class StructuralWalkEngine : public Parent#

Callback-dispatched walk engine with a state-carrying Parent layer.

Every callback receives all entries of Parent::StateTupleType positionally after the value and may optionally take TVMFFIDefRegionKind as the final argument.

A Parent layer derives from StructuralVisitorObj, declares a public StateTupleType, accepts and forwards const StructuralVisitorVTable* in its constructor, and provides an at-least-protected StateTuple() const noexcept that returns StateTupleType by value. The state references in that tuple must outlive the traversal. A layer customizes default descent by overriding DefaultVisitExpected, at least protected. Engine calls use Parent:: qualification; this is static layer dispatch, not virtual dispatch.

Template Parameters:
  • Parent – Traversal layer extended by the engine. Engine protocol and descent calls are Parent::-qualified.

  • order – Callback placement relative to child traversal.

  • Callbacks – Callback links, tested in declaration order.

Public Types

using StateTupleType = typename Parent::StateTupleType#

Tuple of const state references supplied by the Parent layer.

Public Functions

inline explicit StructuralWalkEngine(Callbacks... callbacks)#

Construct a structural walk visitor.

Parameters:

callbacks – The typed callback links, tested in declaration order.