rad
2.0.0
|
#include <activity.hpp>
Public Member Functions | |
ThreadBaseActivity (ThreadBaseActivity const &)=delete | |
void | start () override |
void | stop () override |
std::string | GetName () const |
int | SetName (const std::string &name) |
virtual pthread_t | GetNativeHandle () const =0 |
ThreadBaseActivity (ThreadBaseActivity const &)=delete | |
void | start () override |
void | stop () override |
std::string | GetName () const |
int | SetName (const std::string &name) |
virtual pthread_t | GetNativeHandle () const =0 |
Public Member Functions inherited from scxml4cpp::Activity | |
Activity (const std::string &id) | |
virtual | ~Activity () |
std::string | getId () const |
void | setId (const std::string &id) |
Activity (const std::string &id) | |
virtual | ~Activity () |
std::string | getId () const |
void | setId (const std::string &id) |
Activity (const std::string &id) | |
virtual | ~Activity () |
std::string | getId () const |
void | setId (const std::string &id) |
bool | IsStopRequested () const |
To be implemented by child classes. More... | |
virtual bool | IsThreadJoined () const =0 |
virtual void | StartThread ()=0 |
virtual void | JoinThread ()=0 |
bool | IsStopRequested () const |
To be implemented by child classes. More... | |
virtual bool | IsThreadJoined () const =0 |
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 |
|
delete |
std::string rad::ThreadBaseActivity::GetName | ( | ) | const |
std::string rad::ThreadBaseActivity::GetName | ( | ) | const |
|
pure virtual |
Implemented in rad::ThreadActivity, rad::ThreadActivity, rad::PthreadActivity, and rad::PthreadActivity.
|
pure virtual |
Implemented in rad::ThreadActivity, rad::ThreadActivity, rad::PthreadActivity, and rad::PthreadActivity.
|
inline |
To be implemented by child classes.
|
inline |
To be implemented by child classes.
|
pure virtual |
Implemented in rad::ThreadActivity, rad::ThreadActivity, rad::PthreadActivity, and rad::PthreadActivity.
|
pure virtual |
Implemented in rad::ThreadActivity, rad::ThreadActivity, rad::PthreadActivity, and rad::PthreadActivity.
|
protectedpure virtual |
Implemented in rad::ThreadActivity, rad::ThreadActivity, rad::PthreadActivity, and rad::PthreadActivity.
|
protectedpure virtual |
Implemented in rad::ThreadActivity, rad::ThreadActivity, rad::PthreadActivity, and rad::PthreadActivity.
int rad::ThreadBaseActivity::SetName | ( | const std::string & | name | ) |
Set thread name.
[in] | name | for the thread. Maximum length is 15 characters (excluding null terminator). |
int rad::ThreadBaseActivity::SetName | ( | const std::string & | name | ) |
Set thread name.
[in] | name | for the thread. Maximum length is 15 characters (excluding null terminator). |
|
overridevirtual |
stop()
activity if it's running. Implements scxml4cpp::Activity.
|
overridevirtual |
stop()
activity if it's running. Implements scxml4cpp::Activity.
|
protectedpure virtual |
Implemented in rad::ThreadActivity, rad::ThreadActivity, rad::PthreadActivity, and rad::PthreadActivity.
|
protectedpure virtual |
Implemented in rad::ThreadActivity, rad::ThreadActivity, rad::PthreadActivity, and rad::PthreadActivity.
|
overridevirtual |
Stop activity. If activity is already completed it does nothing.
Implements scxml4cpp::Activity.
|
overridevirtual |
Stop activity. If activity is already completed it does nothing.
Implements scxml4cpp::Activity.