State Machine  0.4.0
This repository contains packages for creating and running general purpose state machines.
state_machine::Context Class Reference

#include <Context.hpp>

Public Member Functions

 Context ()
 
 ~Context ()=default
 
const GlobalDataInterfacePtrgetGlobalDataInterface () const
 
void setGlobalDataInterface (const GlobalDataInterfacePtr &globalDataInterface)
 
const TimeInterfacePtrgetTimeInterface () const
 
void setTimeInterface (const TimeInterfacePtr &timeInterface)
 
const ReportInterfacePtrgetReportInterface () const
 
void setReportInterface (const ReportInterfacePtr &reportInterface)
 

Protected Attributes

GlobalDataInterfacePtr globalDataInterface_
 
TimeInterfacePtr timeInterface_
 
ReportInterfacePtr reportInterface_
 

Detailed Description

The context is a container accessible by all states. It contains the following interfaces:

  • Interface to globally accessible data
  • Interface to access the current time
  • Interface to the report

Constructor & Destructor Documentation

◆ Context()

state_machine::Context::Context ( )
inline

Constructor.

◆ ~Context()

state_machine::Context::~Context ( )
default

Destructor.

Member Function Documentation

◆ getGlobalDataInterface()

const GlobalDataInterfacePtr& state_machine::Context::getGlobalDataInterface ( ) const
inline

Get the interface to the global data.

Returns
Interface to the global data.

◆ getReportInterface()

const ReportInterfacePtr& state_machine::Context::getReportInterface ( ) const
inline

Get the interface to the report.

Returns
Interface to the report.

◆ getTimeInterface()

const TimeInterfacePtr& state_machine::Context::getTimeInterface ( ) const
inline

Get the interface to the time.

Returns
Interface to the time.

◆ setGlobalDataInterface()

void state_machine::Context::setGlobalDataInterface ( const GlobalDataInterfacePtr globalDataInterface)
inline

Set the interface to the global data.

Parameters
globalDataInterfaceInterface to the global data.

◆ setReportInterface()

void state_machine::Context::setReportInterface ( const ReportInterfacePtr reportInterface)
inline

Set the interface to the report.

Parameters
reportInterfaceInterface to the report.

◆ setTimeInterface()

void state_machine::Context::setTimeInterface ( const TimeInterfacePtr timeInterface)
inline

Set the interface to the time.

Parameters
timeInterfaceInterface to the time.

Member Data Documentation

◆ globalDataInterface_

GlobalDataInterfacePtr state_machine::Context::globalDataInterface_
protected

Members set during setup.

◆ reportInterface_

ReportInterfacePtr state_machine::Context::reportInterface_
protected

◆ timeInterface_

TimeInterfacePtr state_machine::Context::timeInterface_
protected

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