Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkStateMachineState.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkStateMachineState_h
14 #define mitkStateMachineState_h
15 
16 #include "MitkCoreExports.h"
18 #include <itkLightObject.h>
19 #include <string>
20 
21 namespace mitk
22 {
30  class MITKCORE_EXPORT StateMachineState : public itk::LightObject
31  {
32  public:
34  mitkNewMacro2Param(Self, const std::string &, const std::string &);
35 
36  typedef std::vector<mitk::StateMachineState::Pointer> StateMap;
37  typedef std::vector<StateMachineTransition::Pointer> TransitionVector;
38 
39  bool AddTransition(StateMachineTransition::Pointer transition);
40 
46  DEPRECATED(StateMachineTransition::Pointer GetTransition(const std::string &eventClass,
47  const std::string &eventVariant));
48 
52  TransitionVector GetTransitionList(const std::string &eventClass, const std::string &eventVariant);
53 
57  std::string GetName() const;
58 
59  std::string GetMode() const;
60 
66  bool ConnectTransitions(StateMap *allStates);
67 
68  protected:
69  StateMachineState(const std::string &name, const std::string &stateMode);
70  ~StateMachineState() override;
71 
72  private:
76  std::string m_Name;
86  std::string m_StateMode;
87 
91  TransitionVector m_Transitions;
92  };
93 } // namespace mitk
94 #endif
mitkNewMacro2Param
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:81
mitk::StateMachineState
Definition: mitkStateMachineState.h:30
DEPRECATED
#define DEPRECATED(func)
Definition: mitkCommon.h:175
itk::SmartPointer< Self >
mitkStateMachineTransition.h
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::StateMachineState::TransitionVector
std::vector< StateMachineTransition::Pointer > TransitionVector
Definition: mitkStateMachineState.h:37
MitkCoreExports.h
mitk::StateMachineState::StateMap
std::vector< mitk::StateMachineState::Pointer > StateMap
Definition: mitkStateMachineState.h:34
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15