Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::StateMachineTransition Class Reference

Connects two states, and holds references to corresponding actions and conditions. More...

#include <mitkStateMachineTransition.h>

Inheritance diagram for mitk::StateMachineTransition:
Collaboration diagram for mitk::StateMachineTransition:

Public Member Functions

 mitkClassMacroItkParent (StateMachineTransition, itk::LightObject)
 
 mitkNewMacro3Param (Self, const std::string &, const std::string &, const std::string &)
 
SpStateMachineState GetNextState () const
 Return the next state that this transition leads to. More...
 
std::string GetNextStateName () const
 Return the name of the next state that this transition leads to. More...
 
bool operator== (const StateMachineTransition &transition) const
 Check for equality with another transition. More...
 
ActionVectorType GetActions () const
 Return the list of actions associated with this transition. More...
 
const ConditionVectorType & GetConditions () const
 Return the list of conditions associated with this transition. More...
 
void SetNextState (const SpStateMachineState &nextState)
 Set the next state of this transition. More...
 

Protected Member Functions

 StateMachineTransition (const std::string &nextStateName, const std::string &eventClass, const std::string &eventVariant)
 
 ~StateMachineTransition () override
 

Protected Attributes

std::string m_EventClass
 
std::string m_EventVariant
 

Detailed Description

Connects two states, and holds references to corresponding actions and conditions.

This class represents a transition between two states of a statemachine. It holds a list of conditions that have to be fulfilled in order to be executed correctly. It also holds a list of actions that will be executed if all conditions are fulfilled.

Definition at line 44 of file mitkStateMachineTransition.h.

Constructor & Destructor Documentation

◆ StateMachineTransition()

mitk::StateMachineTransition::StateMachineTransition ( const std::string &  nextStateName,
const std::string &  eventClass,
const std::string &  eventVariant 
)
protected

◆ ~StateMachineTransition()

mitk::StateMachineTransition::~StateMachineTransition ( )
overrideprotected

Member Function Documentation

◆ GetActions()

ActionVectorType mitk::StateMachineTransition::GetActions ( ) const

Return the list of actions associated with this transition.

Returns
A vector of actions to execute when this transition fires.

◆ GetConditions()

const ConditionVectorType& mitk::StateMachineTransition::GetConditions ( ) const

Return the list of conditions associated with this transition.

Returns
A const reference to the vector of conditions.

◆ GetNextState()

SpStateMachineState mitk::StateMachineTransition::GetNextState ( ) const

Return the next state that this transition leads to.

Returns
Smart pointer to the next state.

◆ GetNextStateName()

std::string mitk::StateMachineTransition::GetNextStateName ( ) const

Return the name of the next state that this transition leads to.

Returns
The next state name.

◆ mitkClassMacroItkParent()

mitk::StateMachineTransition::mitkClassMacroItkParent ( StateMachineTransition  ,
itk::LightObject   
)

◆ mitkNewMacro3Param()

mitk::StateMachineTransition::mitkNewMacro3Param ( Self  ,
const std::string &  ,
const std::string &  ,
const std::string &   
)

◆ operator==()

bool mitk::StateMachineTransition::operator== ( const StateMachineTransition &  transition) const

Check for equality with another transition.

Equality is given if the event variant is the same and classes are the same or the first argument is a superclass of the second.

Warning
The order of arguments matters.
Parameters
[in]transitionthe transition to compare with.
Returns
True if the transitions match.

◆ SetNextState()

void mitk::StateMachineTransition::SetNextState ( const SpStateMachineState &  nextState)

Set the next state of this transition.

Parameters
[in]nextStatethe state to transition to.

Member Data Documentation

◆ m_EventClass

std::string mitk::StateMachineTransition::m_EventClass
protected

Definition at line 104 of file mitkStateMachineTransition.h.

◆ m_EventVariant

std::string mitk::StateMachineTransition::m_EventVariant
protected

Definition at line 105 of file mitkStateMachineTransition.h.


The documentation for this class was generated from the following file: