Template Class StructuralVisitEngine#

Inheritance Relationships#

Base Type#

  • public Parent

Class Documentation#

template<typename Parent, typename ...Callbacks>
class StructuralVisitEngine : public Parent#

Engine of the callback-dispatched tvm::ffi::StructuralVisit.

A matched callback owns descent into its value, and its result is final. A value matching no callback uses the Parent layer’s default descent. The local typed callback fold preserves declaration-order first match and converts an Error thrown by a matched callback into the visit result.

Template Parameters:
  • Parent – Traversal layer extended by the engine. Default descent uses Parent::DefaultVisitExpected; a layer can override this method to customize descent.

  • Callbacks – Callable types whose first parameter selects the dispatched value type.

Public Functions

inline explicit StructuralVisitEngine(Callbacks... callbacks)#

Construct a visit engine over a chain of typed callbacks.

Parameters:

callbacks – Callbacks tested in declaration order; the first match runs.