#include <MboThread.h>
Public Member Functions | |
MboEventThread (bool bAutoStart=true, const char *szThreadName=NULL) | |
virtual | ~MboEventThread () |
IncDecVal | GetCounter () const |
void | SetEvent () const |
virtual bool | IsSignaled () const |
virtual void | Stop () |
Friends | |
class | MboDelayedEventThread |
The derived class MboEventThread implements an endless loop that waits for an event to occur (SetEvent) between each calls of Action(). The callbacks OnThreadStart()/OnThreadStop() are only called once.
Definition at line 387 of file MboThread.h.
mbo::MboEventThread::MboEventThread | ( | bool | bAutoStart = true , |
|
const char * | szThreadName = NULL | |||
) | [explicit] |
constructor
bAutoStart | whether to automatically start the event thread. | |
szThreadName | The name of the thread. The new class instance will copy the value and free its copy automatically upon destruction. You may want to use NULL to use the class name of as the thread name. If you do so the name is computed in thread startup - this only works if this is not done in constructor. If done so the name you will see is the name of that parent class whose constructor started the thread. |
virtual mbo::MboEventThread::~MboEventThread | ( | ) | [virtual] |
destructor
IncDecVal mbo::MboEventThread::GetCounter | ( | ) | const |
Counts the execution times of Action()
void mbo::MboEventThread::SetEvent | ( | ) | const |
Set event which results in calling execute if the thread is running.
virtual bool mbo::MboEventThread::IsSignaled | ( | ) | const [virtual] |
Check whether the thread is signaled. That is the thread event has been set and either the delay hasn't elapsed or the Action() wasn't finished already.
virtual void mbo::MboEventThread::Stop | ( | ) | [virtual] |
Stop the thread.
This stops the thread by signaling it and skipping the delay. Neither Action() is called nor will the Action() counter be incremented.
Reimplemented from mbo::MboThread.
Reimplemented in mbo::MboDelayedEventThread.
friend class MboDelayedEventThread [friend] |
Definition at line 389 of file MboThread.h.
Hosted on code.google.com | © Marcus Börger | Generated on Fri Jan 18 21:21:13 2008 for MBO-lib by ![]() |