|
cxWidgets 1.0
|
Represents a timer that will run a function after. More...
#include <cxTimer.h>

Public Member Functions | |
| cxTimer (const std::shared_ptr< cxFunction > &pFuncPtr, unsigned int pDelayMS, bool pWaitInSeparateThread=true) | |
| Constructor. | |
| virtual | ~cxTimer () |
| virtual void | function (const std::shared_ptr< cxFunction > &pFuncPtr) |
| Sets/changes the function pointer. | |
| virtual std::shared_ptr< cxFunction > | function () const |
| Returns the function pointer that is set in the object. | |
| virtual void | delay (unsigned int pDelay) |
| Sets the delay (in MS) for the timeout. | |
| virtual unsigned int | delay () const |
| Returns the delay (in MS) that is set in the object. | |
| virtual void | waitInSeparateThread (bool pWaitInSeparateThread) |
| Sets whether or not to wait in a separate thread. | |
| virtual bool | waitInSeparateThread () const |
| Returns the setting for whether or not to wait in a separate thread. | |
| virtual void | start () |
| Starts the timer. | |
| virtual void | stop (bool pRunFunction=true) |
| Stops the timer. | |
| virtual bool | isWaiting () const |
| Returns whether the timer object is currently waiting for time to elapse. | |
| virtual std::string | cxTypeStr () const |
| Returns the name of the cxWidgets class. This can be used to. | |
Represents a timer that will run a function after.
a specified number of milliseconds. This class is not
finished yet and currently shouldn't be used.
| cx::cxTimer::cxTimer | ( | const std::shared_ptr< cxFunction > & | pFuncPtr, |
| unsigned int | pDelayMS, | ||
| bool | pWaitInSeparateThread = true |
||
| ) |
Constructor.
| pFuncPtr | A pointer to the function to run once the time is up |
| pDelayMS | The amount of time (in milliseconds) to delay before firing the function |
| pWaitInSeparateThread | Whether or not to wait in a separate thread. Defaults to true. |
References start().
|
virtual |
|
virtual |
Returns the name of the cxWidgets class. This can be used to.
determine the type of cxWidgets object that deriving classes
derive from in applications.
|
virtual |
Returns the delay (in MS) that is set in the object.
|
virtual |
Sets the delay (in MS) for the timeout.
| pDelay | The delay (in MS) for the timeout |
|
virtual |
Returns the function pointer that is set in the object.
|
virtual |
Sets/changes the function pointer.
| pFuncPtr | A pointer to the function to run once the time is up |
|
virtual |
Returns whether the timer object is currently waiting for time to elapse.
|
virtual |
Starts the timer.
Referenced by cxTimer().
|
virtual |
Stops the timer.
| pRunFunction | Boolean: Whether to still run the function. Defaults to true. |
|
virtual |
Returns the setting for whether or not to wait in a separate thread.
|
virtual |
Sets whether or not to wait in a separate thread.
| pWaitInSeparateThread | Whether or not to wait in a separate thread |