rad 6.2.0
|
#include <StateHistory.h>
Public Types | |
enum | HistoryType { Shallow = 0 , Deep } |
![]() | |
enum | StateType { Atomic = 0 , Compound , Parallel , History } |
Public Member Functions | |
StateHistory (const std::string &id, const HistoryType type) | |
virtual | ~StateHistory () |
HistoryType | getHistoryType () |
std::list< State * > & | getHistoryValues () |
void | clearHistoryValues () |
State * | popHistoryValue () |
void | pushHistoryValue (State *s) |
void | setHistoryType (HistoryType type) |
void | setHistoryValues (std::list< State * > &historyValues) |
![]() | |
State (const std::string &id, const StateType type) | |
virtual | ~State () |
std::string | getId () const |
StateType | getType () const |
State * | getParent () |
StateHistory * | getHistory () |
ExecutableContent * | getEntryActions () |
ExecutableContent * | getExitActions () |
std::list< Transition * > & | getInitialTrans () |
State * | getInitialState () |
std::list< State * > & | getSubstates () |
std::list< Transition * > & | getTransitions () |
std::list< Activity * > & | getActivities () |
void | setId (const std::string &id) |
void | setType (const StateType type) |
void | setParent (State *parent) |
void | setIsInitial (const bool isInitial) |
void | setIsFinal (const bool isFinal) |
void | setHistory (StateHistory *h) |
void | setInitialState (State *initialState, Action *a) |
void | setFinalState (State *finalState) |
void | setSubstates (std::list< State * > &substates) |
void | setTransitions (std::list< Transition * > &transitions) |
void | setActivities (std::list< Activity * > &activities) |
bool | isInitial () |
bool | isFinal () |
bool | isCompound () |
bool | isParallel () |
bool | isAtomic () |
bool | isHistory () |
void | startActivities (Context *c) |
void | cancelActivities (Context *c) |
void | addEntryAction (Action *a) |
void | addExitAction (Action *a) |
void | addSubstate (State *s) |
void | addTransition (std::list< State * > &targets, const Event &event, Action *condition, Action *action) |
void | addTransition (State *target, const Event &event, Action *condition, Action *action) |
void | addActivity (Activity *activity) |
void | delTransitions () |
void | delInitialTrans () |
void | delSubstates () |
This class represents an history state. A history state is a pseudo-state that keeps track of a state visited in the past and allows to re-enter it.
There are two types of history states:
scxml4cpp::StateHistory::StateHistory | ( | const std::string & | id, |
const HistoryType | type ) |
Create a history state.
id | State identifier. |
type | Type of history state. |
|
virtual |
Destroy a history state. No memory is deleted.
void scxml4cpp::StateHistory::clearHistoryValues | ( | ) |
Remove all states from the history.
StateHistory::HistoryType scxml4cpp::StateHistory::getHistoryType | ( | ) |
std::list< State * > & scxml4cpp::StateHistory::getHistoryValues | ( | ) |
State * scxml4cpp::StateHistory::popHistoryValue | ( | ) |
void scxml4cpp::StateHistory::pushHistoryValue | ( | State * | s | ) |
Add a state in the history.
s | State to add. |
void scxml4cpp::StateHistory::setHistoryType | ( | HistoryType | type | ) |
Set the type of history states.
@parama type Type of history.
void scxml4cpp::StateHistory::setHistoryValues | ( | std::list< State * > & | historyValues | ) |
Reset the full history to a given list of states.
historyValues | states to be used to populate the history. |