Template Class StructuralMapEngine#

Inheritance Relationships#

Base Type#

  • public Parent

Class Documentation#

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

Callback-dispatched structural mutator with a state-carrying Parent layer.

Each callback is an ordinary callable and the engine selects it on its first argument’s type, using a compile-time-known as<TSub>() on the input node in pre-order and on the descended node in post-order.

Parent derives from StructuralMapEngineBase, publishes StateTupleType, accepts and forwards the mutator vtable in its constructor, and provides a protected StateTuple() const noexcept. Engine-internal descent uses the public Expected entry points, so a Parent may override those entries directly. Each callback receives every tuple entry positionally, followed optionally by TVMFFIDefRegionKind. Descent calls use this->, matching StructuralWalkEngine: lookup happens at instantiation in the Parent’s class scope and is not virtual dispatch. This deliberately leaves composed deeper-layer declarations eligible; spelling the calls as Parent::member would instead pin lookup at that qualified layer. A Parent must not hide other engine-internal this-> members because matching ABI-vtable paths deliberately terminate at StructuralMapEngineBase.

Template Parameters:
  • Parent – Mutator layer that supplies descent and callback state through the complete protocol above.

  • order – Callback placement relative to child mapping.

  • Callbacks – The callbacks, tested in declaration order.

Public Types

using StateTupleType = typename Parent::StateTupleType#

Tuple of state references supplied by the Parent layer.

Public Functions

inline explicit StructuralMapEngine(Callbacks... callbacks)#

Construct a callback-aware mutator that owns its callbacks.

Parameters:

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