public:
enum Stream
{
- INPUT = 0,
- OUTPUT = 1,
- ERROR = 2
+ CIN = 0,
+ COUT = 1,
+ CERR = 2
};
private:
Handle handle;
Console(Stream);
+ void platform_init();
public:
~Console();
Console. */
void get_size(unsigned &rows, unsigned &cols);
+ /** Redirects input from or output to another I/O object. This performs a
+ system-level redirect. Closing the other object won't affect the
+ redirection. */
+ void redirect(Base &);
+
protected:
virtual unsigned do_write(const char *, unsigned);
virtual unsigned do_read(char *, unsigned);
public:
+ virtual const Handle &get_handle(Mode);
virtual const Handle &get_event_handle() { return handle; }
static Console &instance(Stream);