summaryrefslogtreecommitdiff
path: root/otk/timer.hh
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-11-04 03:37:17 +0000
committerDana Jansens <danakj@orodu.net>2002-11-04 03:37:17 +0000
commitd4d89ce0bbd3dd0c556a593accb5e48f7ae09d9e (patch)
tree3424838cd57320229fa74105ab4b4618a1860450 /otk/timer.hh
parente9085c3a45be749fb5bda969552be52a0d60afe0 (diff)
documenting classes!
Diffstat (limited to 'otk/timer.hh')
-rw-r--r--otk/timer.hh19
1 files changed, 18 insertions, 1 deletions
diff --git a/otk/timer.hh b/otk/timer.hh
index 2deeba58..0bc38e1b 100644
--- a/otk/timer.hh
+++ b/otk/timer.hh
@@ -102,11 +102,20 @@ struct TimerLessThan {
typedef _timer_queue<OBTimer*,
std::vector<OBTimer*>, TimerLessThan> TimerQueue;
+//! Manages a queue of OBTimer objects
+/*!
+ All OBTimer objects add themself to an OBTimerQueueManager. The manager is
+ what fires the timers when their time has elapsed. This is done by having the
+ application call the OBTimerQueueManager::fire class in its main event loop.
+*/
class OBTimerQueueManager {
private:
+ //! A priority queue of all timers being managed by this class.
TimerQueue timerList;
public:
+ //! Constructs a new OBTimerQueueManager
OBTimerQueueManager() {}
+ //! Destroys the OBTimerQueueManager
virtual ~OBTimerQueueManager() {}
//! Will wait for and fire the next timer in the queue.
@@ -114,8 +123,16 @@ public:
The function will stop waiting if an event is received from the X server.
*/
virtual void fire();
-
+
+ //! Adds a new timer to the queue
+ /*!
+ @param timer An OBTimer to add to the queue
+ */
virtual void addTimer(OBTimer* timer);
+ //! Removes a timer from the queue
+ /*!
+ @param timer An OBTimer already in the queue to remove
+ */
virtual void removeTimer(OBTimer* timer);
};