1 #ifndef MSP_IO_BUFFERED_H_
2 #define MSP_IO_BUFFERED_H_
4 #include <sigc++/trackable.h>
10 class Buffered: public Base, public sigc::trackable
14 std::size_t buf_size = 0;
21 Buffered(Base &, unsigned = 8192);
24 virtual void set_block(bool);
25 virtual void set_inherit(bool);
30 virtual std::size_t do_write(const char *, std::size_t);
31 virtual std::size_t do_read(char *, std::size_t);
33 virtual std::size_t put(char);
35 bool getline(std::string &);
38 virtual const Handle &get_handle(Mode);
43 Mode get_current_op() const { return cur_op; }
44 std::size_t get_current_size() const;