#include <ConditionalPunctualAction.h>
Inheritance diagram for ConditionalPunctualAction:
An execution check is a check that is performed just before the action associated to the punctual action component are executed. An execution check can have two outcomes: "action can be executed" or "action cannot be executed". This type of punctual action is useful to model punctual actions which should be executed only if certain conditions are met. The execution check can be implemented to verify whether these conditions are met.
This is an abstract class because it leaves open the definition of the actions to be performed by the punctual action component and the definition of the concrete execution check. This class only implements the management of the abstract execution check.
Definition at line 38 of file ConditionalPunctualAction.h.
Public Member Functions | |
ConditionalPunctualAction (void) | |
Instantiate a punctual action. | |
Protected Member Functions | |
virtual TD_ActionOutcome | doAction (void) |
Execute the punctual action if the execution check is satisifed. | |
virtual bool | canExecute (void)=0 |
Encapsulate implementation of the execution check. | |
virtual TD_ActionOutcome | doConditionalAction (void)=0 |
Encapsulate implementation of the actions associated to the punctual action component. |
|
Instantiate a punctual action. This method returns without taking any action. Definition at line 14 of file ConditionalPunctualAction.cpp. |
|
Encapsulate implementation of the execution check.
This method is called by method
Implemented in DC_ControlAction, DC_ControlList, DC_DataPoolMonitor, and DC_DummyConditionalPunctualAction. |
|
Execute the punctual action if the execution check is satisifed. Otherwise, do nothing. A pseudo-code implementation for this method is as follows: if ( canExecute() ) return doConditionalAction(); else return ACTION_CANNOT_EXECUTE;The doConditionalAction() and canExecute() methods are abstract and encapsulate the implementation of the actions associated to the punctual action, and the implementation of the execution check respectively. Thus, this class enforces the execution check but leaves its definition and the definition of the concrete actions associated to the punctual action component open.
Implements PunctualAction. Definition at line 17 of file ConditionalPunctualAction.cpp. |
|
Encapsulate implementation of the actions associated to the punctual action component.
This method is called by method
Implemented in DC_ControlAction, DC_ControlList, DC_DataPoolMonitor, and DC_DummyConditionalPunctualAction. |