1 #ifndef MSP_IO_HANDLE_H_
2 #define MSP_IO_HANDLE_H_
19 Handle(const Handle &);
20 Handle &operator=(const Handle &);
23 Private &operator*() { return *priv; }
24 const Private &operator*() const { return *priv; }
26 /** This is effectively a boolean conversion, but avoids accidental
27 conversion to OS native handles. Unix-based systems use int and win32 uses
28 void *; const void * is not implicitly convertible to either. */
29 operator const void *() const;
33 void sys_set_blocking(Handle &, bool);
34 void sys_set_inherit(Handle &, bool);
35 std::size_t sys_read(Handle &, char *, std::size_t);
36 std::size_t sys_write(Handle &, const char *, std::size_t);
37 void sys_close(Handle &);