#ifndef MSP_IO_EVENTOBJECT_H_
#define MSP_IO_EVENTOBJECT_H_
+#include <msp/core/mspcore_api.h>
#include "base.h"
namespace Msp {
namespace IO {
-struct Handle;
+class Handle;
/**
Interface class for objects that can provide event-based I/O. These objects
can be fed to the various poll functions in poll.h, or added to an
EventDispatcher to generate event signals.
*/
-class EventObject: public Base
+class MSPCORE_API EventObject: public Base
{
public:
/** Emitted when there is data available for reading. If all data is not
sigc::signal<void, PollEvent> signal_events_changed;
private:
- PollEvent events;
+ PollEvent _events = P_NONE;
protected:
EventObject();
+ ~EventObject() override;
void set_events(PollEvent);
public:
/** Returns a mask of the currently interesting events. Used by
EventDispatcher. */
- PollEvent get_events() const { return events; }
+ PollEvent get_events() const { return _events; }
/** Returns a handle for polling. */
virtual const Handle &get_event_handle() = 0;