18 #ifndef __igstkStateMachine_h
19 #define __igstkStateMachine_h
50 template<
class TClass>
151 void Print(std::ostream& os, itk::Indent indent)
const;
156 void PrintSelf( std::ostream& os, itk::Indent indent )
const;
185 bool m_InitialStateSelected;
188 typedef std::map< StateIdentifierType, StateDescriptorType > StatesContainer;
189 typedef typename StatesContainer::iterator StatesIterator;
190 typedef typename StatesContainer::const_iterator StatesConstIterator;
193 StatesContainer m_States;
206 typedef std::map< InputIdentifierType, InputDescriptorType > InputsContainer;
207 typedef typename InputsContainer::iterator InputIterator;
208 typedef typename InputsContainer::const_iterator InputConstIterator;
209 typedef std::queue< InputIdentifierType > InputsQueueContainer;
212 InputsContainer m_Inputs;
216 class StateActionPair
221 this->m_StateIdentifier = 0;
226 this->m_StateIdentifier = state;
227 this->m_Action = action;
229 StateActionPair(
const StateActionPair & in )
231 this->m_StateIdentifier = in.m_StateIdentifier;
232 this->m_Action = in.m_Action;
234 const StateActionPair & operator=(
const StateActionPair & in )
236 this->m_StateIdentifier = in.m_StateIdentifier;
237 this->m_Action = in.m_Action;
242 return m_StateIdentifier;
256 typedef std::map< InputIdentifierType, StateActionPair >
257 TransitionsPerInputContainer;
258 typedef std::map< StateIdentifierType, TransitionsPerInputContainer * >
260 typedef typename TransitionContainer::iterator TransitionIterator;
263 typedef typename TransitionContainer::const_iterator TransitionConstIterator;
264 typedef typename TransitionsPerInputContainer::iterator
265 TransitionsPerInputIterator;
266 typedef typename TransitionsPerInputContainer::const_iterator
267 TransitionsPerInputConstIterator;
269 TransitionContainer m_Transitions;
270 InputsQueueContainer m_QueuedInputs;
274 template<
class TClass>
275 std::ostream& operator<<(std::ostream& os, const StateMachine<TClass>& o);
280 #ifndef IGSTK_MANUAL_INSTANTIATION
281 #include "igstkStateMachine.txx"