MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Yantra::ComputationGrammar::Rule Struct Reference

Represents a computation rule with matching and execution logic. More...

#include <ComputeGrammar.hpp>

+ Collaboration diagram for MayaFlux::Yantra::ComputationGrammar::Rule:

Public Attributes

std::string name
 Unique identifier for this rule.
 
std::string description
 Human-readable description of what the rule does.
 
ComputationContext context {}
 Computational context this rule operates in.
 
int priority = 0
 Execution priority (higher values evaluated first)
 
UniversalMatcher::MatcherFunc matcher
 Function that determines if rule applies.
 
std::function< std::any(const std::any &, const ExecutionContext &)> executor
 Function that performs the computation.
 
std::vector< std::string > dependencies
 Names of rules that must execute before this one.
 
std::unordered_map< std::string, std::any > default_parameters
 Default parameters for the rule's operation.
 
std::chrono::milliseconds max_execution_time { 0 }
 Maximum allowed execution time (0 = unlimited)
 
ExecutionMode preferred_execution_mode = ExecutionMode::SYNC
 Preferred execution mode for this rule.
 
std::type_index target_operation_type = std::type_index(typeid(void))
 Type of operation this rule creates (for type-based queries)
 
std::vector< std::string > tags
 Arbitrary tags for categorization and search.
 

Detailed Description

Represents a computation rule with matching and execution logic.

Rules are the fundamental building blocks of the grammar system. Each rule encapsulates the logic for determining when it should be applied (matcher) and what computation it should perform (executor), along with metadata for organization and optimization.

Definition at line 87 of file ComputeGrammar.hpp.


The documentation for this struct was generated from the following file: