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

◆ create_context_matcher()

static MatcherFunc MayaFlux::Yantra::UniversalMatcher::create_context_matcher ( ComputationContext  required_context)
inlinestatic

Creates a matcher that checks for specific computation contexts.

Parameters
required_contextThe context that must be present
Returns
Matcher function that returns true if context matches

Definition at line 61 of file GrammarHelper.hpp.

62 {
63 return [required_context](const std::any& /*input*/, const ExecutionContext& ctx) -> bool {
64 return ctx.execution_metadata.contains("computation_context") && std::any_cast<ComputationContext>(ctx.execution_metadata.at("computation_context")) == required_context;
65 };
66 }