|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
Per-action readiness predicate deciding whether an action may execute. More...
#include <registry.hpp>
Static Public Member Functions | |
| static constexpr bool | ready (const Action &action) |
| Returns true if the action is in a state that should be executed. | |
Per-action readiness predicate deciding whether an action may execute.
Enforced on every dispatch path that reaches Model::execute (see ValidationError below for the sites), and consulted by morph::flows::FlowSession::set<> (forms/flows.hpp) to decide whether an in-progress draft is complete enough to fire.
Resolution order (highest-priority first):
Validation is intentionally a property of the action, not the model: different actions on the same model have different readiness requirements, and keeping the predicate next to the action keeps the GUI side oblivious to model internals.
| Action | Concrete action type. |
Definition at line 261 of file registry.hpp.
|
inlinestaticconstexpr |
Returns true if the action is in a state that should be executed.
Auto-detects a bool validate() const member on action via the morph::model::detail::HasValidate concept. Falls back to true.
| action | Draft action whose readiness is being checked. |
Definition at line 269 of file registry.hpp.