Template Class StructuralMapEngine#
Defined in File structural_mutate.h
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.Parentderives fromStructuralMapEngineBase, publishesStateTupleType, accepts and forwards the mutator vtable in its constructor, and provides a protectedStateTuple() 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 byTVMFFIDefRegionKind. Descent calls usethis->, matchingStructuralWalkEngine: 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 asParent::memberwould instead pin lookup at that qualified layer. A Parent must not hide other engine-internalthis->members because matching ABI-vtable paths deliberately terminate atStructuralMapEngineBase.- 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