$darkmode
#include <memory>#include <string>#include <utility>#include <vector>#include <cloe/trigger.hpp>#include <cloe/trigger/helper_macros.hpp>Go to the source code of this file.
Classes | |
| class | cloe::actions::SetVariableAction< T > |
| class | cloe::actions::SetVariableActionFactory< T > |
Macros | |
| #define | DEFINE_SET_STATE_ACTION(xName, xname, xdescription, xState, xOperatorBlock) |
| #define | DEFINE_SET_DATA_ACTION(xName, xActionName, xActionDesc, xDataType, xAttributeName, xAttributeType, xOperatorBlock) |
This file defines actions that set a given variable.
| #define DEFINE_SET_DATA_ACTION | ( | xName, | |
| xActionName, | |||
| xActionDesc, | |||
| xDataType, | |||
| xAttributeName, | |||
| xAttributeType, | |||
| xOperatorBlock | |||
| ) |
Macro DEFINE_SET_DATA_ACTION defines an action that sets an attribute from the configuration.
| xName | type identifier for action |
| xActionName | string identifier of action (lowercase) |
| xActionDesc | string description of action |
| xDataType | type identifier for member data pointer |
| xAttributeName | string identifier of the attribute (defines configuration) |
| xAttributeType | type identifier of the attribute |
| xOperatorBlock | code block that makes use of ptr_ and value_ |
Given the type SimulationSync and the action "modify the simulation speed", we can create it in code like so:
This will define the following classes for us:
RealtimeFactorRealtimeFactorFactoryThis action can be registered with the register_action helper function. Refer to doc/reference/actions.rst for the configuration.
| #define DEFINE_SET_STATE_ACTION | ( | xName, | |
| xname, | |||
| xdescription, | |||
| xState, | |||
| xOperatorBlock | |||
| ) |
Macro DEFINE_SET_STATE_ACTION defines an action that has only a single state and no configuration.
| xName | type identifier for event |
| xname | string identifier of event (lowercase) |
| xdescription | string description of event |
| xState | type identifier for member state pointer |
| xOperatorBlock | code block that makes use of ptr_ |
Given the type Simulation and the action "abort the simulation", we can create it in code like so, note that the semicolon at the end is required.
This will define the following classes for us:
AbortAbortFactoryThis action can be registered with the register_action helper function.