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

#include <Transition.h>

Public Member Functions

 Transition ()
 
virtual ~Transition ()
 
StategetSource ()
 
const EventgetEvent ()
 
std::list< State * > & getTargets ()
 
void addTarget (State *s)
 
void addAction (Action *a)
 
void addCondition (Action *c)
 
ExecutableContentgetActions ()
 
ExecutableContentgetConditions ()
 
bool isEnabled (Context *c)
 
bool isEnabled (const Event &e, Context *c)
 
void setSource (State *source)
 
void setTargets (std::list< State * > &targets)
 
void setEvent (const Event &e)
 

Detailed Description

This class represents a State Machine transition.

It can be used for:

Constructor & Destructor Documentation

◆ Transition()

scxml4cpp::Transition::Transition ( )

Creates a transition object.

It allocates two ExecutableContent objects:

  • for the actions
  • for the guards

◆ ~Transition()

scxml4cpp::Transition::~Transition ( )
virtual

Deletes a transition object.

It deallocates the two ExecutableContent objects:

  • for the actions
  • for the guards

Member Function Documentation

◆ addAction()

void scxml4cpp::Transition::addAction ( Action * a)

Add an action to the ExecutableContent to be executed when the transition is taken.

Parameters
aPointer to an action.

◆ addCondition()

void scxml4cpp::Transition::addCondition ( Action * c)

Add a guard to the ExecutableContent to be evaluated before a transition is taken.

Parameters
aPointer to an action which represent a guard.

◆ addTarget()

void scxml4cpp::Transition::addTarget ( State * s)

Add a target state to the transition.

Parameters
sPointer to a target state to be added.

◆ getActions()

ExecutableContent * scxml4cpp::Transition::getActions ( )
Returns
A pointer to ExecutableContent containing the list of actions associated to the transition.

◆ getConditions()

ExecutableContent * scxml4cpp::Transition::getConditions ( )
Returns
A pointer to ExecutableContent containing the list of guards associated to the transition.

◆ getEvent()

const Event & scxml4cpp::Transition::getEvent ( )
Returns
A reference to the transition triggering event.

◆ getSource()

State * scxml4cpp::Transition::getSource ( )
Returns
A pointer to the transition source state.

◆ getTargets()

std::list< State * > & scxml4cpp::Transition::getTargets ( )
Returns
A reference to a list of possible target states.

◆ isEnabled() [1/2]

bool scxml4cpp::Transition::isEnabled ( const Event & e,
Context * c )
Returns
true if the given event matches the event in the transition and the guard is satisfied.

◆ isEnabled() [2/2]

bool scxml4cpp::Transition::isEnabled ( Context * c)
Returns
true if the transition has NULL event and the guard is satisfied.

◆ setEvent()

void scxml4cpp::Transition::setEvent ( const Event & e)

Set the event that should trigger the transition.

◆ setSource()

void scxml4cpp::Transition::setSource ( State * source)

Set the source state of the transition.

Parameters
sPointer to a source state.

◆ setTargets()

void scxml4cpp::Transition::setTargets ( std::list< State * > & targets)

Set the target state(s) of the transition.

Parameters
targetsList of target states.

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