-#ifndef EVENTDISPATCHER_H_
-#define EVENTDISPATCHER_H_
+#ifndef MSP_IO_EVENTDISPATCHER_H_
+#define MSP_IO_EVENTDISPATCHER_H_
#include <sigc++/connection.h>
#include <sigc++/trackable.h>
+#include <msp/time/timedelta.h>
+#include <msp/time/timer.h>
#include "poll.h"
namespace Msp {
public:
EventDispatcher();
+ ~EventDispatcher();
void add(EventObject &);
void remove(EventObject &);
waits at most the specified time before returning. */
void tick(const Time::TimeDelta &);
+ /** Checks for and dispatches events. If there are no events available,
+ waits until the timer's next timeout before returning. */
+ void tick(const Time::Timer &);
+
private:
void object_events_changed(PollEvent, EventObject *);
void object_deleted(EventObject *);