|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Represents a computation rule with matching and execution logic. More...
#include <ComputeGrammar.hpp>
Collaboration diagram for MayaFlux::Yantra::ComputationGrammar::Rule:Public Types | |
| using | Executor = std::function< std::any(const std::any &, const ExecutionContext &)> |
| Type alias for matcher functions used in computation rules. | |
Public Attributes | |
| ComputationContext | context {} |
| Computational context this rule operates in. | |
| std::unordered_map< std::string, std::any > | default_parameters |
| Default parameters for the rule's operation. | |
| std::vector< std::string > | dependencies |
| Names of rules that must execute before this one. | |
| std::string | description |
| Human-readable description of what the rule does. | |
| Executor | executor |
| Function that performs the computation. | |
| UniversalMatcher::MatcherFunc | matcher |
| Function that determines if rule applies. | |
| std::chrono::milliseconds | max_execution_time { 0 } |
| Maximum allowed execution time (0 = unlimited) | |
| std::string | name |
| Unique identifier for this rule. | |
| ExecutionMode | preferred_execution_mode = ExecutionMode::SYNC |
| Preferred execution mode for this rule. | |
| int | priority = 0 |
| Execution priority (higher values evaluated first) | |
| std::vector< std::string > | tags |
| Arbitrary tags for categorization and search. | |
| std::type_index | target_operation_type = std::type_index(typeid(void)) |
| Type of operation this rule creates (for type-based queries) | |
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.