

Public Types | |
| typedef ULONG_PTR | UserData |
| User data that can be passed to Timer via the OnTimer() call when the timeout expires. | |
| typedef ULONG_PTR | Handle |
| A handle to a timer that has been created. This can be passed to SetTimer(), CancelTimer() and DestroyTimer() and is created with CreateTimer(). | |
Public Member Functions | |
| virtual Handle | CreateTimer ()=0 |
| Create a timer and return a Handle to it. | |
| virtual bool | SetTimer (const Handle &handle, Timer &timer, const Milliseconds timeout, const UserData userData)=0 |
| Set a timer that was previously created with CreateTimer(). Returns true if the timer was previously pending for another timeout and false if the timer was not already pending. Note that calling SetTimer() will cause any timers that have expired to be processed before the new timer is set. | |
| virtual bool | CancelTimer (const Handle &handle)=0 |
| Cancel a timer that was previously set with SetTimer(). Returns true if the timer was pending and false if the timer was not pending. | |
| virtual bool | DestroyTimer (Handle &handle)=0 |
| Destroy a timer that was previously created with CreateTimer() and update the variable passed in to contain InvalidHandleValue. Note that it is not permitted to call DestroyHandle() on a handle that contains the InvalidHandleValue value and an exception is thrown in this case. Returns true if the timer was pending and false if the timer was not pending. | |
| virtual bool | DestroyTimer (const Handle &handle)=0 |
| Destroy a timer that was previously created with CreateTimer(). Returns true if the timer was pending and false if the timer was not pending. | |
| virtual void | SetTimer (Timer &timer, const Milliseconds timeout, const UserData userData)=0 |
| Create and set a single use timer. Note that calling SetTimer() will cause any timers that have expired to be processed before the new timer is set. | |
| virtual Milliseconds | GetMaximumTimeout () const =0 |
| Returns the maximum timeout value that can be set. Note that this may differ between instances of the objects that implement this interface. | |
| virtual bool | DispatchesWithoutLock () const =0 |
| Returns true if the queue dispatches timers without holding an internal lock which it also requires to manipulate timers. | |
Static Public Attributes | |
| static Handle | InvalidHandleValue = 0 |
| The value that represents an invalid handle that cannot be used. | |
Protected Member Functions | |
| ~IQueueTimers () | |
| We never delete instances of this interface; you must manage the lifetime of the class that implements it. | |
Classes | |
| class | Timer |
| An interface to a timer that can be set with IQueueTimers. More... | |
| typedef ULONG_PTR UserData |
User data that can be passed to Timer via the OnTimer() call when the timeout expires.
| typedef ULONG_PTR Handle |
A handle to a timer that has been created. This can be passed to SetTimer(), CancelTimer() and DestroyTimer() and is created with CreateTimer().
| ~IQueueTimers | ( | ) | [inline, protected] |
We never delete instances of this interface; you must manage the lifetime of the class that implements it.
| virtual Handle CreateTimer | ( | ) | [pure virtual] |
Create a timer and return a Handle to it.
Implemented in CCallbackTimerQueueBase, and CThreadedCallbackTimerQueue.
| virtual bool SetTimer | ( | const Handle & | handle, | |
| Timer & | timer, | |||
| const Milliseconds | timeout, | |||
| const UserData | userData | |||
| ) | [pure virtual] |
Set a timer that was previously created with CreateTimer(). Returns true if the timer was previously pending for another timeout and false if the timer was not already pending. Note that calling SetTimer() will cause any timers that have expired to be processed before the new timer is set.
Implemented in CCallbackTimerQueueBase, and CThreadedCallbackTimerQueue.
Cancel a timer that was previously set with SetTimer(). Returns true if the timer was pending and false if the timer was not pending.
Implemented in CCallbackTimerQueueBase, and CThreadedCallbackTimerQueue.
Destroy a timer that was previously created with CreateTimer() and update the variable passed in to contain InvalidHandleValue. Note that it is not permitted to call DestroyHandle() on a handle that contains the InvalidHandleValue value and an exception is thrown in this case. Returns true if the timer was pending and false if the timer was not pending.
Implemented in CCallbackTimerQueueBase, and CThreadedCallbackTimerQueue.
Destroy a timer that was previously created with CreateTimer(). Returns true if the timer was pending and false if the timer was not pending.
Implemented in CCallbackTimerQueueBase, and CThreadedCallbackTimerQueue.
| virtual void SetTimer | ( | Timer & | timer, | |
| const Milliseconds | timeout, | |||
| const UserData | userData | |||
| ) | [pure virtual] |
Create and set a single use timer. Note that calling SetTimer() will cause any timers that have expired to be processed before the new timer is set.
Implemented in CCallbackTimerQueueBase, and CThreadedCallbackTimerQueue.
| virtual Milliseconds GetMaximumTimeout | ( | ) | const [pure virtual] |
Returns the maximum timeout value that can be set. Note that this may differ between instances of the objects that implement this interface.
Implemented in CCallbackTimerQueueBase, and CThreadedCallbackTimerQueue.
| virtual bool DispatchesWithoutLock | ( | ) | const [pure virtual] |
Returns true if the queue dispatches timers without holding an internal lock which it also requires to manipulate timers.
Implemented in CCallbackTimerQueueBase, and CThreadedCallbackTimerQueue.
IQueueTimers::Handle InvalidHandleValue = 0 [static] |
The value that represents an invalid handle that cannot be used.
1.5.3