MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class encapsulating timer functions. More...
#include <mdsTimer.h>
Public Types | |
enum | { CLASS_OBJECT } |
Templates that require members of the CObject class can use this enum to check the existence. More... | |
enum | { HEAP_OBJECT = 0x70616568 } |
Signature used to recognize objects on the heap. More... | |
Public Member Functions | |
CTimer (unsigned uDelay, bool bRun=true) | |
Constructor. | |
unsigned | getDelay () |
Returns the timer delay. | |
int | getReferencesCount () const |
Returns the number of references. | |
bool | isOnHeap () const |
Returns true if the object is allocated on the heap. | |
bool | isRunning () |
Returns true if the timer is already running. | |
MDS_SHAREDPTR (CTimer) | |
Smart pointer type. | |
void | setDelay (unsigned uDelay) |
Sets the timer delay. | |
void | signal () |
Signals the timer event. | |
void | start () |
Starts the timer. | |
void | stop () |
Stops the timer. | |
bool | wait (unsigned uTimeout) |
Waits for the timer event. | |
virtual | ~CTimer () |
Default destructor. | |
Static Public Member Functions | |
static void * | operator new (std::size_t Size) |
Allocates a new object on the heap. | |
Protected Member Functions | |
void | addReference () const |
Increase the reference counter. | |
bool | delReference () const |
Decrease the reference counter. | |
Protected Attributes | |
CEvent | m_Event |
Event signalled every time the timer delay elapses. | |
int | m_iHeapObject |
Flag initialized if the object is on the heap. | |
int | m_iReferences |
The number of references to the object. | |
unsigned | m_uDelay |
The timer delay. |
Class encapsulating timer functions.
anonymous enum [inherited] |
Templates that require members of the CObject class can use this enum to check the existence.
mds::sys::CTimer::CTimer | ( | unsigned | uDelay, |
bool | bRun = true |
||
) |
Constructor.
virtual mds::sys::CTimer::~CTimer | ( | ) | [virtual] |
Default destructor.
void mds::base::CObject::addReference | ( | ) | const [protected, inherited] |
Increase the reference counter.
bool mds::base::CObject::delReference | ( | ) | const [protected, inherited] |
Decrease the reference counter.
unsigned mds::sys::CTimer::getDelay | ( | ) |
Returns the timer delay.
int mds::base::CObject::getReferencesCount | ( | ) | const [inherited] |
Returns the number of references.
bool mds::base::CObject::isOnHeap | ( | ) | const [inherited] |
Returns true if the object is allocated on the heap.
bool mds::sys::CTimer::isRunning | ( | ) |
Returns true if the timer is already running.
Smart pointer type.
static void* mds::base::CObject::operator new | ( | std::size_t | Size | ) | [static, inherited] |
Allocates a new object on the heap.
void mds::sys::CTimer::setDelay | ( | unsigned | uDelay | ) |
Sets the timer delay.
void mds::sys::CTimer::signal | ( | ) |
Signals the timer event.
void mds::sys::CTimer::start | ( | ) |
Starts the timer.
void mds::sys::CTimer::stop | ( | ) |
Stops the timer.
bool mds::sys::CTimer::wait | ( | unsigned | uTimeout | ) |
Waits for the timer event.
CEvent mds::sys::CTimer::m_Event [protected] |
Event signalled every time the timer delay elapses.
int mds::base::CObject::m_iHeapObject [mutable, protected, inherited] |
Flag initialized if the object is on the heap.
int mds::base::CObject::m_iReferences [mutable, protected, inherited] |
The number of references to the object.
unsigned mds::sys::CTimer::m_uDelay [protected] |
The timer delay.