rad 6.2.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
scxml4cpp::StateHistory Class Reference

#include <StateHistory.h>

Inheritance diagram for scxml4cpp::StateHistory:
scxml4cpp::State

Public Types

enum  HistoryType { Shallow = 0 , Deep }
 
- Public Types inherited from scxml4cpp::State
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 ()
 
StatepopHistoryValue ()
 
void pushHistoryValue (State *s)
 
void setHistoryType (HistoryType type)
 
void setHistoryValues (std::list< State * > &historyValues)
 
- Public Member Functions inherited from scxml4cpp::State
 State (const std::string &id, const StateType type)
 
virtual ~State ()
 
std::string getId () const
 
StateType getType () const
 
StategetParent ()
 
StateHistorygetHistory ()
 
ExecutableContentgetEntryActions ()
 
ExecutableContentgetExitActions ()
 
std::list< Transition * > & getInitialTrans ()
 
StategetInitialState ()
 
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 ()
 

Detailed Description

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:

Member Enumeration Documentation

◆ HistoryType

Types of supported history states.

Enumerator
Shallow 
Deep 

Constructor & Destructor Documentation

◆ StateHistory()

scxml4cpp::StateHistory::StateHistory ( const std::string & id,
const HistoryType type )

Create a history state.

Parameters
idState identifier.
typeType of history state.

◆ ~StateHistory()

scxml4cpp::StateHistory::~StateHistory ( )
virtual

Destroy a history state. No memory is deleted.

Member Function Documentation

◆ clearHistoryValues()

void scxml4cpp::StateHistory::clearHistoryValues ( )

Remove all states from the history.

◆ getHistoryType()

StateHistory::HistoryType scxml4cpp::StateHistory::getHistoryType ( )
Returns
The type of history states.

◆ getHistoryValues()

std::list< State * > & scxml4cpp::StateHistory::getHistoryValues ( )
Returns
the list of states in the history.

◆ popHistoryValue()

State * scxml4cpp::StateHistory::popHistoryValue ( )
Returns
the last added state in the history.

◆ pushHistoryValue()

void scxml4cpp::StateHistory::pushHistoryValue ( State * s)

Add a state in the history.

Parameters
sState to add.

◆ setHistoryType()

void scxml4cpp::StateHistory::setHistoryType ( HistoryType type)

Set the type of history states.

@parama type Type of history.

◆ setHistoryValues()

void scxml4cpp::StateHistory::setHistoryValues ( std::list< State * > & historyValues)

Reset the full history to a given list of states.

Parameters
historyValuesstates to be used to populate the history.

The documentation for this class was generated from the following files: