#include <CRunState.h>
Public Types | |
| typedef enum CRunState::_RunState_ | RunState | 
| enum | _RunState_ { Inactive, Active, Paused } | 
Public Methods | |
| CRunState () | |
| Default constructor.  | |
| CRunState (const CRunState &rhs) | |
| Copy constructor.  | |
| ~CRunState () | |
| Destructor.  | |
| CRunState & | operator= (const CRunState &rhs) | 
| Assignment.  | |
| int | operator== (const CRunState &rhs) const | 
| Comparison for equality.  | |
| int | operator!= (const CRunState &rhs) const | 
| enum RunState | getState () const | 
| map< enum RunState, string > | getStatesByValue () const | 
| map< string, enum RunState > | getStatesByName () const | 
| map< enum RunState, set< RunState > > | getTransitions () const | 
| void | Begin () | 
| void | End () | 
| void | Pause () | 
| void | Resume () | 
| bool | Allowed (RunState newstate) | 
| string | getStateName () | 
| string | getStateName (enum RunState state) | 
| void | SetStateVariable (enum RunState state) | 
Private Attributes | |
| enum RunState | m_eState | 
| Value of the state.  | |
| map< enum RunState, string > | m_StatesByValue | 
| State names looked up by state value.  | |
| map< string, enum RunState > | m_StatesByName | 
| State Values looked up by run state.  | |
| map< enum RunState, set< RunState > > | m_Transitions | 
| For each state, allowed transitions.  | |
Definition at line 307 of file CRunState.h.
      
  | 
  
| 
 
 Referenced by getState().  | 
  
      
  | 
  
| 
 
 Definition at line 310 of file CRunState.h.  | 
  
      
  | 
  
| 
 Default constructor. Default constructor. This is called when declarations of the form e.g.: 
 Definition at line 294 of file CRunState.cpp. References Active, Inactive, m_StatesByName, m_StatesByValue, m_Transitions, and Paused.  | 
  
      
  | 
  
| 
 Copy constructor. Copy construction. This is invoked when e.g. an object is passed by value to a function. The copy constructor makes a clone of the rhs object. Definition at line 331 of file CRunState.cpp.  | 
  
      
  | 
  
| 
 Destructor. 
 Definition at line 329 of file CRunState.h.  | 
  
      
  | 
  
| 
 Determine if a transitionis allowed from the current state: Definition at line 476 of file CRunState.cpp. References m_eState, and m_Transitions.  | 
  
      
  | 
  
| 
 If it is legal to transition from the current state to the active state this is done, otherwise a CBadTransition exception is thrown. Definition at line 382 of file CRunState.cpp. References Active, Allowed(), getStateName(), m_eState, m_StatesByValue, and SetStateVariable(). Referenced by CBeginCommand::operator()().  | 
  
      
  | 
  
| 
 If it is legal to transition from the current state to Inactive, this is done, otherwise a CBadTransitionException is thrown. Definition at line 403 of file CRunState.cpp. References Allowed(), getStateName(), Inactive, m_eState, m_StatesByValue, and SetStateVariable(). Referenced by CEndCommand::operator()().  | 
  
      
  | 
  
| 
 
 Definition at line 340 of file CRunState.h. References m_eState, and RunState. Referenced by CStateVariable::operator()(), and CExitCommand::operator()().  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 The current state value is translated into a string. 
 Definition at line 468 of file CRunState.cpp. References m_eState, and m_StatesByValue.  | 
  
      
  | 
  
| 
 
 Definition at line 348 of file CRunState.h. References m_StatesByName.  | 
  
      
  | 
  
| 
 
 Definition at line 344 of file CRunState.h. References m_StatesByValue.  | 
  
      
  | 
  
| 
 
 Definition at line 352 of file CRunState.h. References m_Transitions.  | 
  
      
  | 
  
| 
 
 Definition at line 333 of file CRunState.h. References operator==().  | 
  
      
  | 
  
| 
 Assignment. Assignment operation. This member function supports assignment of an object of this class to an object of the same class. Definition at line 345 of file CRunState.cpp. References m_eState, m_StatesByName, m_StatesByValue, and m_Transitions.  | 
  
      
  | 
  
| 
 Comparison for equality. Comparison for equality: The only important member for equality comparison is the current state (m_eState). 
 
 Definition at line 368 of file CRunState.cpp. References m_eState. Referenced by operator!=().  | 
  
      
  | 
  
| 
 If it is legal to transition from the current state to the Paused state this is done. Otherwise, a CBadTransition exception is thrown. Definition at line 425 of file CRunState.cpp. References Allowed(), getStateName(), m_eState, m_StatesByValue, Paused, and SetStateVariable(). Referenced by CPauseCommand::operator()().  | 
  
      
  | 
  
| 
 If the current state is Paused, this member transitions to Active. If not, a CBadTransition exception is thrown. Definition at line 447 of file CRunState.cpp. References Active, getStateName(), m_eState, m_StatesByValue, Paused, and SetStateVariable(). Referenced by CResumeCommand::operator()().  | 
  
      
  | 
  
| 
 
  | 
  
      
  | 
  
| 
 Value of the state. 
 Definition at line 316 of file CRunState.h. Referenced by Allowed(), Begin(), End(), getState(), getStateName(), operator=(), operator==(), Pause(), and Resume().  | 
  
      
  | 
  
| 
 State Values looked up by run state. 
 Definition at line 320 of file CRunState.h. Referenced by CRunState(), getStatesByName(), and operator=().  | 
  
      
  | 
  
| 
 State names looked up by state value. 
 Definition at line 318 of file CRunState.h. Referenced by Begin(), CRunState(), End(), getStateName(), getStatesByValue(), operator=(), Pause(), and Resume().  | 
  
      
  | 
  
| 
 For each state, allowed transitions. 
 Definition at line 322 of file CRunState.h. Referenced by Allowed(), CRunState(), getTransitions(), and operator=().  | 
  
1.2.16