MayaFlux 0.1.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();

Definition at line 475 of file ComputeGrammar.hpp.

476 {
477 return RuleBuilder(this, name);
478 }