-#ifndef MSP_IO_BUFFERED_H_
-#define MSP_IO_BUFFERED_H_
-
-#include "base.h"
-
-namespace Msp {
-namespace IO {
-
-class Buffered: public Base
-{
-private:
- Base &below;
- unsigned buf_size;
- char *buf;
- char *begin;
- char *end;
- Mode cur_op;
-
-public:
- Buffered(Base &, unsigned =8192);
- ~Buffered();
-
- void flush();
-
-protected:
- unsigned do_write(const char *, unsigned);
- unsigned do_read(char *, unsigned);
-public:
- unsigned put(char);
-
- bool getline(std::string &);
- int get();
-
-private:
- void set_op(Mode);
-public:
- Mode get_current_op() const { return cur_op; }
- unsigned get_current_size() const;
-
- virtual Handle get_event_handle();
-};
-
-} // namespace IO
-} // namespace Msp
-
-#endif