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

#include <actionCallback.hpp>

Inheritance diagram for rad::ActionCallback:
scxml4cpp::Action

Public Member Functions

 ActionCallback (const std::string &id, std::function< void(scxml4cpp::Context *c)> action_method)
 
void execute (scxml4cpp::Context *c)
 
bool evaluate (scxml4cpp::Context *c)
 
 ActionCallback (const ActionCallback &)=delete
 
ActionCallbackoperator= (const ActionCallback &)=delete
 Disable copy constructor.
 
- Public Member Functions inherited from scxml4cpp::Action
 Action (const std::string &id)
 
virtual ~Action ()
 
std::string getId () const
 
std::string getParam () const
 
void setId (const std::string &id)
 
void setParam (const std::string &p)
 

Detailed Description

This class binds an scxml::Action to a method of a class.

Constructor & Destructor Documentation

◆ ActionCallback() [1/2]

rad::ActionCallback::ActionCallback ( const std::string & id,
std::function< void(scxml4cpp::Context *c)> action_method )
Parameters
[in]idAction name.
[in]action_methodMapping to the class method implementing the action.

◆ ActionCallback() [2/2]

rad::ActionCallback::ActionCallback ( const ActionCallback & )
delete

Member Function Documentation

◆ evaluate()

bool rad::ActionCallback::evaluate ( scxml4cpp::Context * c)
virtual

This method is used for the evaluation of a guard.

Parameters
[in]cSCXML context.

Implements scxml4cpp::Action.

◆ execute()

void rad::ActionCallback::execute ( scxml4cpp::Context * c)
virtual

This method is executed when an action, mapped to a method of class is invoked. After extracting from the SCXML context the last event, it triggers the call of the class method associated to the action.

Parameters
[in]cSCXML context.

Implements scxml4cpp::Action.

◆ operator=()

ActionCallback & rad::ActionCallback::operator= ( const ActionCallback & )
delete

Disable copy constructor.


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