#include <MboThread.h>
Public Member Functions | |
MboDelayedEventThread (size_t nMilliSeconds=0, bool bAutoStart=true, const char *szThreadName=NULL) | |
virtual | ~MboDelayedEventThread () |
virtual void | Stop () |
virtual void | SetDelay (size_t nMilliSeconds=0) |
virtual size_t | GetDelay () const |
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. Unlike the base class MboEventThread you can set a delay between event and action.
Definition at line 463 of file MboThread.h.
mbo::MboDelayedEventThread::MboDelayedEventThread | ( | size_t | nMilliSeconds = 0 , |
|
bool | bAutoStart = true , |
|||
const char * | szThreadName = NULL | |||
) | [explicit] |
constructor
nMilliSeconds | delay between event and action. | |
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::MboDelayedEventThread::~MboDelayedEventThread | ( | ) | [virtual] |
destructor
virtual void mbo::MboDelayedEventThread::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::MboEventThread.
virtual void mbo::MboDelayedEventThread::SetDelay | ( | size_t | nMilliSeconds = 0 |
) | [virtual] |
virtual size_t mbo::MboDelayedEventThread::GetDelay | ( | ) | const [virtual] |
Hosted on code.google.com | © Marcus Börger | Generated on Fri Jan 18 21:21:13 2008 for MBO-lib by ![]() |