Represents a state of a state machine pattern.
More...
#include <mitkStateMachineState.h>
|
| typedef std::vector< mitk::StateMachineState::Pointer > | StateMap |
| |
| typedef std::vector< StateMachineTransition::Pointer > | TransitionVector |
| |
Represents a state of a state machine pattern.
It holds transitions to other states (mitk::StateMachineTransition) and the mode of the current state, which determines how the dispatcher handles events.
Definition at line 32 of file mitkStateMachineState.h.
◆ StateMap
◆ TransitionVector
◆ StateMachineState()
| mitk::StateMachineState::StateMachineState |
( |
const std::string & |
name, |
|
|
const std::string & |
stateMode |
|
) |
| |
|
protected |
◆ ~StateMachineState()
| mitk::StateMachineState::~StateMachineState |
( |
| ) |
|
|
overrideprotected |
◆ AddTransition()
| bool mitk::StateMachineState::AddTransition |
( |
StateMachineTransition::Pointer |
transition | ) |
|
Add a transition to this state.
- Parameters
-
| [in] | transition | the transition to add. |
- Returns
- True if the transition was added, false if it already exists.
◆ ConnectTransitions()
| bool mitk::StateMachineState::ConnectTransitions |
( |
StateMap * |
allStates | ) |
|
Connect all transitions to their target states by resolving state name references.
Post-processing step when building a state machine from XML. Iterates all transitions and finds the State that matches each transition's target state name.
- Parameters
-
| [in] | allStates | a list of all states in the state machine. |
- Returns
- True if all transitions were connected successfully, false if any target state was not found.
◆ GetMode()
| std::string mitk::StateMachineState::GetMode |
( |
| ) |
const |
Return the mode of this state.
The mode can be "REGULAR", "GRAB_INPUT", or "PREFER_INPUT".
- Returns
- The state mode string.
◆ GetName()
| std::string mitk::StateMachineState::GetName |
( |
| ) |
const |
Return the name of this state.
- Returns
- The state name.
◆ GetTransitionList()
| TransitionVector mitk::StateMachineState::GetTransitionList |
( |
const std::string & |
eventClass, |
|
|
const std::string & |
eventVariant |
|
) |
| |
Return all transitions matching the given event description.
- Parameters
-
| [in] | eventClass | the event class to match. |
| [in] | eventVariant | the event variant to match. |
- Returns
- A vector of matching transitions.
◆ mitkClassMacroItkParent()
| mitk::StateMachineState::mitkClassMacroItkParent |
( |
StateMachineState |
, |
|
|
itk::LightObject |
|
|
) |
| |
◆ mitkNewMacro2Param()
| mitk::StateMachineState::mitkNewMacro2Param |
( |
Self |
, |
|
|
const std::string & |
, |
|
|
const std::string & |
|
|
) |
| |
The documentation for this class was generated from the following file: