Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef SMSTATE_H_HEADER_INCLUDED_C19A8A5D
18 #define SMSTATE_H_HEADER_INCLUDED_C19A8A5D
19 
20 #include "MitkCoreExports.h"
22 #include <itkLightObject.h>
23 #include <string>
24 
25 namespace mitk
26 {
34  class MITKCORE_EXPORT StateMachineState : public itk::LightObject
35  {
36  public:
38  mitkNewMacro2Param(Self, const std::string &, const std::string &);
39 
40  typedef std::vector<mitk::StateMachineState::Pointer> StateMap;
41  typedef std::vector<StateMachineTransition::Pointer> TransitionVector;
42 
43  bool AddTransition(StateMachineTransition::Pointer transition);
44 
50  DEPRECATED(StateMachineTransition::Pointer GetTransition(const std::string &eventClass,
51  const std::string &eventVariant));
52 
56  TransitionVector GetTransitionList(const std::string &eventClass, const std::string &eventVariant);
57 
61  std::string GetName() const;
62 
63  std::string GetMode() const;
64 
70  bool ConnectTransitions(StateMap *allStates);
71 
72  protected:
73  StateMachineState(const std::string &name, const std::string &stateMode);
75 
76  private:
80  std::string m_Name;
90  std::string m_StateMode;
91 
95  TransitionVector m_Transitions;
96  };
97 } // namespace mitk
98 #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:89
#define DEPRECATED(func)
Definition: mitkCommon.h:183
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
std::vector< mitk::StateMachineState::Pointer > StateMap
static std::string GetName(std::string fileName, std::string suffix)
std::vector< StateMachineTransition::Pointer > TransitionVector