demux_timer_queue.hpp

00001 #line 809 "./lpsrc/flx_demux.pak"
00002 #ifndef __TIMER_QUEUE__
00003 #define __TIMER_QUEUE__
00004 
00005 #include <flx_demux_config.hpp>
00006 
00007 namespace flx { namespace demux {
00008 
00009 // trying to factor out code to share between pc & posix versions
00010 
00011 // class sleep_task : public worker_task
00012 // may not need time in here - just the wakeup - something I surely have
00013 // somewhere else.
00014 class DEMUX_EXTERN sleep_task
00015 {
00016 public:
00017     virtual ~sleep_task() {}
00018 
00019     virtual void fire() = 0;
00020 };
00021 
00022 class DEMUX_EXTERN timer_queue
00023 {
00024 public:
00025     virtual ~timer_queue() {}
00026 
00027     virtual void add_sleep_request(sleep_task* st, double delta) = 0;
00028     virtual void add_abs_sleep_request(sleep_task* st, double when) = 0;
00029 
00030     // bad design - this is actually implemented in the descendent classes,
00031     // which limits the number of such classes probably to one.
00032     static void get_time(double& t);        // in seconds from some ref pt
00033 };
00034 
00035 }} // namespace demux, flx
00036 
00037 #endif
00038 

Generated on Mon Dec 11 17:08:15 2006 for Felix by  doxygen 1.5.1