X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FScheduler%2FTimerEventProxy.hh;h=75c4f8cebb283424998c6a4d120f45c36f1af92d;hb=ff4249b4a9c23236b2e56dcd593c91a5c58f7b75;hp=08301ec306efaa8e4f7932d8c9cfa7d1a13354c2;hpb=4adca0eda1b26c8ca84421fd936f8450713ca6fd;p=senf.git diff --git a/senf/Scheduler/TimerEventProxy.hh b/senf/Scheduler/TimerEventProxy.hh index 08301ec..75c4f8c 100644 --- a/senf/Scheduler/TimerEventProxy.hh +++ b/senf/Scheduler/TimerEventProxy.hh @@ -50,27 +50,26 @@ namespace scheduler { host a big count of timers. */ template - class TimerEventProxy + class TimerEventProxy { public: typedef boost::function Callback; - TimerEventProxy(); ///< Instantiate a TimerEventProxy - TimerEventProxy(std::string const & name, console::DirectoryNode & node); - /**< \brief Instantiate a TimerEventProxy and add the list - command to the give DirectoryNode */ - + TimerEventProxy(std::string const & description = ""); + ///< Instantiate a TimerEventProxy + /**< \param[in] description Descriptive name (purely informational) */ + void add(ClockService::clock_type timeout, IdType const & id, Callback cb); ///< Add new deadline timer - + bool remove(IdType const & id); ///< Remove timer by given \a id. - + std::vector > list() const; ///< Returns a vector of all active timers with timeout and id. - + ClockService::clock_type timeout(IdType const & id) const; ///< Returns timeout for given id - /**< if no timer for this id is registered \a 0 is returned. */ + /**< if no timer for this id is registered \a 0 is returned. */ private: #ifndef DOXYGEN struct Entry { @@ -90,11 +89,11 @@ namespace scheduler { boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag, - boost::multi_index::member + boost::multi_index::member >, boost::multi_index::ordered_unique< boost::multi_index::tag, - boost::multi_index::member + boost::multi_index::member > > > EntrySet_t; @@ -104,7 +103,7 @@ namespace scheduler { EntrySet_t entrySet; EntrySetById_t & entrySetById; EntrySetByTimeout_t & entrySetByTimeout; - + scheduler::TimerEvent timer; void timerEvent(); // callback for the Scheduler timer event