1 #ifndef MSP_IO_MEMORY_H_
2 #define MSP_IO_MEMORY_H_
9 class Memory: public Seekable
17 Memory(char *d, std::size_t s, Mode m = M_RDWR): Memory(d, d+s, m) { }
18 Memory(char *, char *, Mode = M_RDWR);
19 Memory(const char *d, std::size_t s): Memory(const_cast<char *>(d), const_cast<char *>(d+s), M_READ) { }
20 Memory(const char *b, const char *e): Memory(const_cast<char *>(b), const_cast<char *>(e), M_READ) { }
22 virtual void set_block(bool);
23 virtual void set_inherit(bool);
26 virtual std::size_t do_write(const char *, std::size_t);
27 virtual std::size_t do_read(char *, std::size_t);
29 virtual std::size_t put(char);
30 virtual bool getline(std::string &);
33 virtual const Handle &get_handle(Mode);
35 virtual SeekOffset seek(SeekOffset, SeekType);
36 virtual SeekOffset tell() const { return pos-begin; }