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

#include <Context.h>

Public Member Functions

 Context ()
 
 Context (const Context &c)
 
Contextoperator= (const Context &c)
 
 ~Context ()
 
const std::string & getName () const
 
const std::string & getSessionId () const
 
EventgetLastEvent () const
 
void setName (const std::string &name)
 
void setSessionId (const std::string &id)
 
void setLastEvent (Event *e)
 

Detailed Description

This class contains the information required to execute Actions or evaluate Guards.

For example it contains the last event received by the State Machine interpreter.

TODO change mLastEvent to shared_ptr

Constructor & Destructor Documentation

◆ Context() [1/2]

Context::Context ( )

Creates an empty context.

◆ Context() [2/2]

Context::Context ( const Context & c)

Copy constructor.

Parameters
cSource context to copy.

◆ ~Context()

Context::~Context ( )

Destroy a Context object.

This destructor does not deallocate memory.

Member Function Documentation

◆ getLastEvent()

Event * Context::getLastEvent ( ) const
Returns
A pointer to the last event received.

◆ getName()

const std::string & Context::getName ( ) const
Returns
The context name.

◆ getSessionId()

const std::string & Context::getSessionId ( ) const
Returns
The identifier for the current State Machine execution session.

◆ operator=()

Context & Context::operator= ( const Context & c)

Assignment operator.

Parameters
cSource context to assign.

◆ setLastEvent()

void Context::setLastEvent ( Event * e)

Set the last event.

Parameters
ePointer to the event.

◆ setName()

void Context::setName ( const std::string & name)

Set the name of the context.

Parameters
nameContext's name.

◆ setSessionId()

void Context::setSessionId ( const std::string & id)

Set the session identifier.

Parameters
idSession identifier.

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