Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef TRANSITION_H_HEADER_INCLUDED_C19AE06B
00020 #define TRANSITION_H_HEADER_INCLUDED_C19AE06B
00021
00022 #include "mitkCommon.h"
00023 #include <string>
00024 #include <vector>
00025 #include <itkWeakPointer.h>
00026 #include "mitkAction.h"
00027
00028
00029 namespace mitk {
00030 class State;
00031
00039 class MITK_CORE_EXPORT Transition
00040 {
00041 public:
00042
00043 typedef std::vector< mitk::Action::Pointer > ActionVectorType;
00044 typedef ActionVectorType::iterator ActionVectorIterator;
00045 typedef const ActionVectorIterator ActionVectorConstIterator;
00046
00050 void AddAction( Action* action );
00051
00055 std::string GetName() const;
00056
00060 State* GetNextState() const;
00061
00065 int GetNextStateId() const;
00066
00070 int GetEventId() const;
00071
00075 unsigned int GetActionCount() const;
00076
00080 ActionVectorIterator GetActionBeginIterator() const;
00081
00085 ActionVectorConstIterator GetActionEndIterator() const;
00086
00090 bool IsEvent(int eventId) const;
00091
00095 void SetNextState(State* state);
00096
00102 Transition(std::string name, int nextStateId, int eventId);
00103
00107 ~Transition();
00108
00109 private:
00113 std::string m_Name;
00114
00118 itk::WeakPointer<mitk::State> m_NextState;
00119
00123 int m_NextStateId;
00124
00128 int m_EventId;
00129
00133 mutable std::vector<Action::Pointer> m_Actions;
00134
00135 };
00136
00137 }
00138
00139
00140
00141 #endif