X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Scheduler%2FEventManager.hh;h=099ebae7d97d896c99575a3ca9736eb2055bdb57;hb=c45c112ae88196ea8da9c5a9efb0e167196744d2;hp=56a32ae413bf1dc465c1355c97817670fdfbe3bb;hpb=2da517bbcdb2af10d2322fc762ca27774b53b435;p=senf.git diff --git a/Scheduler/EventManager.hh b/Scheduler/EventManager.hh index 56a32ae..099ebae 100644 --- a/Scheduler/EventManager.hh +++ b/Scheduler/EventManager.hh @@ -23,8 +23,8 @@ /** \file \brief EventManager public header */ -#ifndef HH_SchedulerEventManager_ -#define HH_SchedulerEventManager_ 1 +#ifndef HH_SENF_Scheduler_EventManager_ +#define HH_SENF_Scheduler_EventManager_ 1 // Custom includes #include @@ -32,7 +32,7 @@ #include "../boost/intrusive/ilist.hpp" #include "../boost/intrusive/ilist_hook.hpp" #include "../Utils/singleton.hh" -#include "Console/LazyDirectory.hh" +#include "../Utils/Console/LazyDirectory.hh" //#include "EventManager.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -65,11 +65,11 @@ namespace detail { ///@} /////////////////////////////////////////////////////////////////////////// - std::string const & name() const; - bool enabled() const; - unsigned runCount() const; - char const * type() const; - std::string info() const; + std::string const & name() const; ///< Get event name + bool enabled() const; ///< \c true, if event is enabled, \c false otherwise + unsigned runCount() const; ///< Number of times, event was fired + char const * type() const; ///< Event type code + std::string info() const; ///< Additional event information protected: void countRun(); @@ -88,15 +88,16 @@ namespace detail { class EventManager : public singleton { - struct IteratorFilter { - bool operator()(Event const & e); - }; - public: using singleton::instance; using singleton::alive; - typedef boost::filter_iterator iterator; + struct IteratorFilter { + bool operator()(Event const & e); + }; + + typedef boost::filter_iterator< + IteratorFilter, EventList::const_iterator> iterator; void add(Event & event); void remove(Event & event); @@ -104,6 +105,8 @@ namespace detail { iterator begin() const; iterator end() const; + void listEvents(std::ostream & os); + protected: private: @@ -114,8 +117,6 @@ namespace detail { friend class singleton; #ifndef SENF_DISABLE_CONSOLE - void consoleEvents(std::ostream & os); - console::LazyDirectory consoleDir_; #endif };