The output of a resolution — the first action filling each slot. More...
#include <PhosphorRules/RuleEvaluator.h>
Public Member Functions | |
| bool | hasSlot (const QString &slot) const |
True if slot was filled by some matching rule. | |
| std::optional< RuleAction > | slot (const QString &slot) const |
The action that filled slot, or nullopt if the slot is unfilled. | |
| bool | isExcluded () const |
| True if an in-scope terminal exclusion action matched — the window is excluded from the resolving consumer's concern. | |
| bool | isEmpty () const |
| True if no slot was filled and no terminal action matched. | |
| QStringList | filledSlots () const |
| All filled slot ids — for tests / introspection. | |
| bool | fillSlot (const QString &slot, const RuleAction &action) |
Records action into slot iff the slot is currently unfilled. | |
| void | markExcluded () |
| Marks the result excluded (an in-scope terminal exclusion matched). | |
| bool | operator== (const ResolvedActions &other) const |
The output of a resolution — the first action filling each slot.
Conflict resolution is first-matching-rule-wins per slot: as the evaluator walks rules in descending priority, the first action it sees for a given slot fills that slot and later actions for the same slot are ignored. Actions in different slots stack.
Critically, a slot is recorded as filled the moment an action lands in it — even if that action's params are empty. slot(...) returns a present-but-empty value, distinguishable from a never-filled slot (std::nullopt). The animation engaged-empty effectId sentinel ("a rule matched and deliberately blocks the shader" vs "no rule matched") depends on exactly this distinction.
|
inline |
All filled slot ids — for tests / introspection.
Returned sorted so tests can compare against a stable list; without the sort, QHash::keys() order is unspecified and varies across runs (Qt hash seeds are randomised per-process). Callers are not expected to be on a hot path.
| bool PhosphorRules::ResolvedActions::fillSlot | ( | const QString & | slot, |
| const RuleAction & | action ) |
Records action into slot iff the slot is currently unfilled.
Returns true if it filled the slot, false if the slot was already filled.
|
inline |
True if slot was filled by some matching rule.
|
inline |
True if no slot was filled and no terminal action matched.
|
inline |
True if an in-scope terminal exclusion action matched — the window is excluded from the resolving consumer's concern.
|
inline |
Marks the result excluded (an in-scope terminal exclusion matched).
|
inline |
| std::optional< RuleAction > PhosphorRules::ResolvedActions::slot | ( | const QString & | slot | ) | const |
The action that filled slot, or nullopt if the slot is unfilled.
A filled slot may carry an action with empty params — that is NOT the same as an unfilled slot.