#include <StateMachine.hh>
Inherits Module.
Inherited by ExperimentRunner.
List of all members.
Detailed Description
Abstract base class for all state machine implementations.
This class provides a template for all state machine implementations. It defines a uniform interface for defining and running state machines, automatically handling event checking and state transitions. A state machine contains a list of its state classed, all derived from the State class, a list of event objects, all derived from the Event class and finally a list of arcs which are instances of the Arc class.
Constructor & Destructor Documentation
StateMachine::StateMachine |
( |
char * |
n |
) |
[inline] |
|
|
Constructor with only a name specification. The module index is set to 0 and the initial state must be explicitly defined through initialize before activation. |
StateMachine::StateMachine |
( |
char * |
n, |
|
|
State * |
i |
|
) |
[inline] |
|
|
Constructor to specify a name and the initial state. The module index is set to 0. |
StateMachine::StateMachine |
( |
char * |
n, |
|
|
uint |
index |
|
) |
[inline] |
|
|
Constructor to specify a name and the module index. The initial state is set to NULL and must be explicitly defined through initialize before activation. |
StateMachine::StateMachine |
( |
char * |
n, |
|
|
uint |
index, |
|
|
bool |
user |
|
) |
[inline] |
|
|
Constructor to specify a name, the module index and the multi/single user properties. The initial state is set to NULL and must be explicitly defined through initialize before activation. |
StateMachine::StateMachine |
( |
char * |
n, |
|
|
uint |
index, |
|
|
State * |
i |
|
) |
[inline] |
|
|
Constructor to specify a name, the module index and the initial state. |
Member Function Documentation
State* StateMachine::getCurState |
( |
void |
|
) |
[inline] |
|
|
This method returns a pointer to the current state. |
void StateMachine::initialize |
( |
State * |
i |
) |
[inline] |
|
|
This method sets the initial state for the state machine execution. |
Friends And Related Function Documentation
EventObject |
( |
_name_ |
|
) |
[related]
|
|
|
Convenience macro to define a subclass of the Event class within a StateMachine subclass declaration.
usage: EventObject ( MyEvent ) * myEvent; |
StateObject |
( |
_name_ |
|
) |
[related]
|
|
|
Convenience macro to define a subclass of the Event class within a StateMachine subclass declaration.
usage: StateObject ( MyState ) * myState |
Transition |
( |
_from_, |
|
|
_event_, |
|
|
_to_ |
|
) |
[related]
|
|
|
Convenience macro to define a directed arc between two states, associated with an event object. |
RHexLib Reference Documentation