1 #ifndef MSP_IO_HANDLE_H_
2 #define MSP_IO_HANDLE_H_
5 #include <msp/core/mspcore_api.h>
10 class MSPCORE_API Handle
16 Private *priv = nullptr;
20 Handle(const Handle &);
21 Handle &operator=(const Handle &);
24 Private &operator*() { return *priv; }
25 const Private &operator*() const { return *priv; }
27 explicit operator bool() const;
31 void sys_set_blocking(Handle &, bool);
32 void sys_set_inherit(Handle &, bool);
33 std::size_t sys_read(Handle &, char *, std::size_t);
34 std::size_t sys_write(Handle &, const char *, std::size_t);
35 void sys_close(Handle &);