Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Go to the documentation of this file.
13 #ifndef mitkEventStateMachine_h
14 #define mitkEventStateMachine_h
16 #include "itkObject.h"
29 #define CONNECT_FUNCTION(a, f) \
30 ::mitk::EventStateMachine::AddActionFunction( \
32 ::mitk::MessageDelegate2<Self, ::mitk::StateMachineAction *, ::mitk::InteractionEvent *, void>(this, &Self::f));
34 #define CONNECT_CONDITION(a, f) \
35 ::mitk::EventStateMachine::AddConditionFunction( \
36 a, ::mitk::MessageDelegate1<Self, const ::mitk::InteractionEvent *, bool>(this, &Self::f));
45 class StateMachineTransition;
46 class StateMachineContainer;
47 class StateMachineAction;
48 class StateMachineCondition;
49 class InteractionEvent;
50 class StateMachineState;
127 bool LoadStateMachine(
const std::string &filename,
const us::Module *module =
nullptr);
175 void ResetToStartState();
183 virtual void ConnectActionsAndFunctions();
216 void SetMouseCursor(
const char *xpm[],
int hotspotX,
int hotspotY);
222 void ResetMouseCursor();
249 typedef std::map<std::string, ActionFunctionDelegate *> ActionDelegatesMapType;
250 typedef std::map<std::string, ConditionFunctionDelegate *> ConditionDelegatesMapType;
253 *m_StateMachineContainer;
254 std::map<std::string, TActionFunctor *> m_ActionFunctionsMap;
255 ActionDelegatesMapType m_ActionDelegatesMap;
256 ConditionDelegatesMapType m_ConditionDelegatesMap;
259 bool m_MouseCursorSet;
virtual bool DoAction(StateMachineAction *, InteractionEvent *)=0
MessageAbstractDelegate1< const InteractionEvent *, bool > ConditionFunctionDelegate
virtual ~TActionFunctor()
void EnableUndo(bool enable)
Enables or disabled Undo.
Represents a condition, that has to be fulfilled in order to execute a state machine transition after...
Find image slices visible on a given plane.
itk::SmartPointer< StateMachineState > StateMachineStateType
UndoController * m_UndoController
Connects two states, and holds references to corresponding actions and conditions.
std::map< std::string, TActionFunctor * > ActionFunctionsMapType
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
#define mitkClassMacro(className, SuperClassName)
void EnableInteraction(bool enable)
Enables/disables the state machine. In un-enabled state it won't react to any events.
MessageAbstractDelegate2< StateMachineAction *, InteractionEvent *, void > ActionFunctionDelegate
Class for nodes of the DataTree.
Base class of ActionFunctors, to provide an easy to connect actions with functions.