17 #ifndef HH_SENF_Scheduler_EventManager_ 18 #define HH_SENF_Scheduler_EventManager_ 1 22 #include <boost/iterator/filter_iterator.hpp> 23 #include <boost/intrusive/list.hpp> 24 #include <boost/intrusive/list_hook.hpp> 37 typedef boost::intrusive::list_base_hook< boost::intrusive::tag<EventListTag> >
EventListBase;
38 typedef boost::intrusive::list<
Event,
39 boost::intrusive::constant_time_size<false>,
40 boost::intrusive::base_hook<EventListBase> >
EventList;
45 :
public EventListBase
61 std::string
const &
name()
const;
64 char const *
type()
const;
65 std::string
info()
const;
71 virtual bool v_enabled()
const = 0;
72 virtual char const * v_type()
const = 0;
73 virtual std::string v_info()
const = 0;
89 bool operator()(Event
const & e);
92 typedef boost::filter_iterator<
95 void add(Event & event);
96 void remove(Event & event);
98 iterator begin()
const;
101 void listEvents(std::ostream & os);
std::string info() const
Additional event information.
boost::intrusive::list_base_hook< boost::intrusive::tag< EventListTag > > EventListBase
Event(std::string const &name)
char const * type() const
Event type code.
unsigned runCount() const
Number of times, event was fired.
boost::intrusive::list< Event, boost::intrusive::constant_time_size< false >, boost::intrusive::base_hook< EventListBase > > EventList
bool enabled() const
true, if event is enabled, false otherwise
std::string const & name() const
Get event name.
boost::filter_iterator< IteratorFilter, EventList::const_iterator > iterator