Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::StateMachineCondition Class Reference

Represents a condition, that has to be fulfilled in order to execute a state machine transition after a certain event. More...

#include <mitkStateMachineCondition.h>

Public Member Functions

 StateMachineCondition (const std::string &, const bool inverted)
 
 ~StateMachineCondition ()
 
std::string GetConditionName () const
 Returns the String-Id of this action. More...
 
bool IsInverted () const
 

Detailed Description

Represents a condition, that has to be fulfilled in order to execute a state machine transition after a certain event.

This class represents a condition in the interaction framework. A condition corresponds to a transition (StateMachineTransition) between two states (StateMachineState) and models one requirement that has to be fulfilled in order to execute its transition.

A condition returns either true or false. If the condition is to be inverted, the bool-flag m_Inverted is set to true.

example:

<state name="dummy-state">
<transition event="dummy-event" target="dummy-state">
<condition name="dummy_condition_fulfilled" /> <!-- condition is fulfilled -->
<action name"do_something" >
</transition>
<transition event="dummy-event" target="dummy-state">
<condition name="dummy_condition_fulfilled" inverted="true"/> <!-- condition is NOT fulfilled -->
<action name"do_something_else" >
</transition>
</state>

Definition at line 51 of file mitkStateMachineCondition.h.

Constructor & Destructor Documentation

mitk::StateMachineCondition::StateMachineCondition ( const std::string &  conditionName,
const bool  inverted 
)

Definition at line 19 of file mitkStateMachineCondition.cpp.

mitk::StateMachineCondition::~StateMachineCondition ( )

Definition at line 24 of file mitkStateMachineCondition.cpp.

Member Function Documentation

std::string mitk::StateMachineCondition::GetConditionName ( ) const

Returns the String-Id of this action.

Definition at line 28 of file mitkStateMachineCondition.cpp.

Referenced by mitk::EventStateMachine::CheckCondition().

bool mitk::StateMachineCondition::IsInverted ( ) const

Definition at line 33 of file mitkStateMachineCondition.cpp.


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