MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ create_rule()

RuleBuilder MayaFlux::Yantra::ComputationGrammar::create_rule ( const std::string &  name)
inline

Create a rule builder for fluent rule construction.

Parameters
nameUnique name for the rule
Returns
RuleBuilder instance for method chaining

This is the entry point for the fluent rule building interface. Returns a RuleBuilder that can be used to configure and build a rule using method chaining.

Example:

auto builder = grammar.create_rule("my_rule");
builder.with_context(ComputationContext::MATHEMATICAL)
.matches_type<std::vector<double>>()
.executes([](const auto& input, const auto& ctx) { return input; })
.build();
Core::GlobalInputConfig input
Definition Config.cpp:38

Definition at line 524 of file ComputeGrammar.hpp.

525 {
526 return RuleBuilder(this, name);
527 }
std::string name
Definition VKDevice.cpp:143

References name.