Embedded Template Library 1.0
|
#include <state_chart.h>
Public Types | |
typedef void | parameter_t |
typedef state_chart_traits::state_id_t | state_id_t |
typedef state_chart_traits::event_id_t | event_id_t |
typedef state_chart_traits::transition< TObject, void > | transition |
typedef state_chart_traits::state< TObject > | state |
![]() | |
typedef void | parameter_t |
typedef state_chart_traits::state_id_t | state_id_t |
typedef state_chart_traits::event_id_t | event_id_t |
Public Member Functions | |
ETL_CONSTEXPR | state_chart (TObject &object_, const transition *transition_table_begin_, const transition *transition_table_end_, const state *state_table_begin_, const state *state_table_end_, const state_id_t state_id_) |
void | set_transition_table (const transition *transition_table_begin_, const transition *transition_table_end_) |
void | set_state_table (const state *state_table_begin_, const state *state_table_end_) |
TObject & | get_object () |
const TObject & | get_object () const |
virtual void | start (bool on_entry_initial=true) ETL_OVERRIDE |
Start the state chart. More... | |
void | process_event (event_id_t event_id) ETL_OVERRIDE |
![]() | |
istate_chart (state_id_t initial_state_id) | |
virtual void | process_event (event_id_t)=0 |
virtual void | start (bool on_entry_initial=true)=0 |
state_id_t | get_state_id () const |
Additional Inherited Members | |
![]() | |
state_id_t | current_state_id |
The current state id. | |
Simple Finite State Machine Runtime tables. Event has no parameter.
|
inline |
Constructor.
object_ | A reference to the implementation object. |
transition_table_begin_ | The start of the table of transitions. |
transition_table_end_ | The end of the table of transitions. |
state_table_begin_ | The start of the state table. |
state_table_end_ | The end of the state table. |
state_id_ | The initial state id. |
|
inline |
Gets a reference to the implementation object.
|
inline |
Gets a const reference to the implementation object.
|
inlinevirtual |
Processes the specified event. The state machine will action the first item in the transition table that satisfies the conditions for executing the action.
event_id | The id of the event to process. |
Implements etl::istate_chart< void >.
|
inline |
Sets the state table.
state_table_begin_ | The start of the state table. |
state_table_end_ | The end of the state table. |
|
inline |
Sets the transition table.
state_table_begin_ | The start of the state table. |
state_table_end_ | The end of the state table. |
|
inlinevirtual |
Start the state chart.
Implements etl::istate_chart< void >.