Medical Imaging Interaction Toolkit  2018.04.99-aba3194f
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 SMSTATE_H_HEADER_INCLUDED_C19A8A5D
14 #define SMSTATE_H_HEADER_INCLUDED_C19A8A5D
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 /* SMSTATE_H_HEADER_INCLUDED_C19A8A5D */
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:85
#define DEPRECATED(func)
Definition: mitkCommon.h:179
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
std::vector< mitk::StateMachineState::Pointer > StateMap
std::vector< StateMachineTransition::Pointer > TransitionVector