added a clear() method to the TimerEventProxy to allow the removal of all pending...
mtk [Mon, 9 May 2011 15:46:52 +0000 (15:46 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1786 270642c3-0616-0410-b53a-bc976706d245

senf/Scheduler/TimerEventProxy.ct
senf/Scheduler/TimerEventProxy.hh

index c9a58f6..0caaf20 100644 (file)
@@ -109,7 +109,13 @@ template<typename IdType>
 prefix_ unsigned senf::scheduler::TimerEventProxy<IdType>::numEvents()
   const
 {
-  return entrySetByTimeout.size();
+    return entrySetByTimeout.size();
+}
+
+template<typename IdType>
+prefix_ void senf::scheduler::TimerEventProxy<IdType>::clear()
+{
+    entrySetByTimeout.clear();
 }
 
 //-/////////////////////////////////////////////////////////////////////////////////////////////////
index c7ec857..651a6b9 100644 (file)
@@ -71,6 +71,8 @@ namespace scheduler {
                                         /**< if no timer for this id is registered \a 0 is returned. */
 
         unsigned numEvents() const;  ///< Returns the number of pending timer events 
+
+        void clear(); ///< Clears all pending timer events
         
     private:
 #ifndef DOXYGEN