3 This file is part of libmspio
4 Copyright © 2009 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_IO_MEMORY_H_
9 #define MSP_IO_MEMORY_H_
17 class Memory: public Base
25 Memory(char *, unsigned);
26 Memory(char *, char *);
27 Memory(const char *, unsigned);
28 Memory(const char *, const char *);
30 void init(char *, char *, Mode);
33 virtual unsigned put(char);
34 virtual bool getline(std::string &);
36 unsigned seek(int, SeekType);
37 unsigned tell() const { return pos-begin; }
38 virtual Handle get_event_handle();
40 virtual unsigned do_write(const char *, unsigned);
41 virtual unsigned do_read(char *, unsigned);
42 void check_mode(Mode) const;