This class represents an interface for an Action.
An action is a piece of code executed by the State Machine interpreter. Since the execution is synchronous, it is blocking the interpretation of the SCXML document.
The implementation of the action can be added by sub-classing and implementing the execute() virtual method.
This class can also be used to implement a guard by sub-classing and implementing the evaluate() virtual method.
Actions can be executed when entering, exiting, or transitioning to a state.
Guards are evaluated before taking a transition.
virtual bool scxml4cpp::Action::evaluate |
( |
Context * |
c | ) |
|
|
pure virtual |
Evaluate a guard condition usually verified before taking a transition. The evaluation is blocking the State Machine interpreter and therefore should be short (ideally it should last 0 time).
- Parameters
-
c | Context for the execution of the action. |
- Returns
- true If the guard is satisfied, false otherwise.
Implemented in rad::GuardCallback, TestWarningsAction, TestReplaceAction, TestDOMSCXMLReaderAction, TestAppendAction, TestCondition, TestAction, TestCondition, TestMergerAction, TestHelperAction, TestExecutorAction, TestExecutableContentAction2, TestExecutableContentAction, MyAction, TrsHealthAction, TimerAction, ReplyAction, ReplyAction, TestDummyAction, SignalAction, MyAction, rad::ActionCallback, and scxml4cpp::ActionTrace.