]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/eventreader.h
Add move semantics to Variant
[libs/core.git] / source / io / eventreader.h
index b3acdb9185d66a53d81181ca2f6fa28bb7874d9f..11091ab98556a511e6d50720533815b91438f2a0 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_IO_EVENTREADER_H_
 #define MSP_IO_EVENTREADER_H_
 
+#include <msp/core/noncopyable.h>
 #include "handle.h"
 
 namespace Msp {
@@ -18,23 +19,23 @@ empty, a new overlapped read is started.
 Unix-based systems can poll the fd directly, so this class reduces to a simple
 passthrough to sys_read.
 */
-class EventReader
+class EventReader: private NonCopyable
 {
 private:
        struct Private;
 
        Handle &handle;
-       Private *priv;
+       Private *priv = nullptr;
 
 public:
-       EventReader(Handle &, unsigned);
+       EventReader(Handle &, std::size_t);
        ~EventReader();
 
-       const Handle &get_event() const;
+       const Handle &get_event();
 
        void start();
        void wait();
-       unsigned read(char *, unsigned);
+       unsigned read(char *, std::size_t);
 };
 
 } // namespace IO