One action carried by a Rule. More...
#include <PhosphorRules/RuleAction.h>
Public Member Functions | |
| bool | operator== (const RuleAction &other) const |
| bool | operator!= (const RuleAction &other) const |
| QJsonObject | toJson () const |
Static Public Member Functions | |
| static std::optional< RuleAction > | fromJson (const QJsonObject &obj) |
| Strict loader — validates against the ActionRegistry; returns nullopt for an unregistered type or params that fail descriptor validation. | |
Public Attributes | |
| QString | type |
| registered action type id (e.g. | |
| QJsonObject | params |
| Action-specific payload. | |
One action carried by a Rule.
A RuleAction is a { type, params } pair. The type selects an ActionDescriptor in the ActionRegistry; the descriptor maps the action to a slot and validates/serializes its params.
Conflict resolution during evaluation is first-matching-rule-wins per slot — actions in different slots stack, actions in the same slot do not. Some action types compute their slot from a params field (the animation actions are scoped by their event), so the slot is resolved through the registry rather than stored on the action.
|
static |
Strict loader — validates against the ActionRegistry; returns nullopt for an unregistered type or params that fail descriptor validation.
|
inline |
|
inline |
| QJsonObject PhosphorRules::RuleAction::toJson | ( | ) | const |
| QJsonObject PhosphorRules::RuleAction::params |
| QString PhosphorRules::RuleAction::type |
registered action type id (e.g.