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

#include <guardCallback.hpp>

Inheritance diagram for rad::GuardCallback:
scxml4cpp::Action

Public Member Functions

 GuardCallback (const std::string &id, std::function< bool(scxml4cpp::Context *c)> guard_method)
 
void execute (scxml4cpp::Context *c) override
 
bool evaluate (scxml4cpp::Context *c) override
 
 GuardCallback (GuardCallback &&)=default
 
GuardCallbackoperator= (GuardCallback &&)=default
 
 GuardCallback (const GuardCallback &)=delete
 
GuardCallbackoperator= (const GuardCallback &)=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::Guard to a method of a class.

Constructor & Destructor Documentation

◆ GuardCallback() [1/3]

rad::GuardCallback::GuardCallback ( const std::string & id,
std::function< bool(scxml4cpp::Context *c)> guard_method )
explicit
Parameters
[in]idGuard name.
[in]guard_methodMapping to the class method implementing the guard.

◆ GuardCallback() [2/3]

rad::GuardCallback::GuardCallback ( GuardCallback && )
default

◆ GuardCallback() [3/3]

rad::GuardCallback::GuardCallback ( const GuardCallback & )
delete

Member Function Documentation

◆ evaluate()

bool rad::GuardCallback::evaluate ( scxml4cpp::Context * c)
overridevirtual

This method is used for the evaluation of a guard.

Implements scxml4cpp::Action.

◆ execute()

void rad::GuardCallback::execute ( scxml4cpp::Context * c)
overridevirtual

This method is executed when an guard, 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 guard.

Parameters
[in]cSCXML context.

Implements scxml4cpp::Action.

◆ operator=() [1/2]

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

Disable copy constructor.

◆ operator=() [2/2]

GuardCallback & rad::GuardCallback::operator= ( GuardCallback && )
default

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