rad 6.2.0
|
#include <activity.hpp>
Public Member Functions | |
ThreadBaseActivity (ThreadBaseActivity const &)=delete | |
void | start (scxml4cpp::Context *c) override |
void | stop (scxml4cpp::Context *c) override |
virtual pthread_t | GetNativeHandle () const =0 |
bool | IsStopRequested () const |
virtual bool | IsThreadJoined () const =0 |
![]() | |
Activity (const std::string &id) | |
virtual | ~Activity () |
std::string | getId () const |
void | setId (const std::string &id) |
Protected Member Functions | |
virtual void | StartThread ()=0 |
virtual void | JoinThread ()=0 |
Base class for different implementations of threaded activities.
It implements start(), stop() from scxml4cpp::Activity and provides IsStopRequested()
which returns true if the activity implementation should stop and exit.
Implementations need to implement thread-specific methods:
This is a shared base for std::thread and pthread_t based threaded activities.
|
delete |
|
pure virtual |
Implemented in rad::ThreadActivity, and rad::PthreadActivity.
|
inline |
Method used by child classes to check whether they should be stopping.
|
pure virtual |
Interface to be implemented by child classes to verify whether the thread is running or not.
Implemented in rad::ThreadActivity, and rad::PthreadActivity.
|
protectedpure virtual |
Implemented in rad::ThreadActivity, and rad::PthreadActivity.
|
overridevirtual |
Start the thread implementing the activity.
c | SCXML context. |
stop()
activity if it's running. Implements scxml4cpp::Activity.
|
protectedpure virtual |
Implemented in rad::ThreadActivity, and rad::PthreadActivity.
|
overridevirtual |
Stop the thread implementing the activity.
c | SCXML context. |
Implements scxml4cpp::Activity.