3 This file is part of libmspio
4 Copyright © 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_IO_CONSOLE_H_
9 #define MSP_IO_CONSOLE_H_
17 Provides access to standard input, output and error streams. This class can't
18 be instantiated directly - use one of the cin, cout and cerr references
21 class Console: public Base
30 virtual void set_block(bool);
32 /** If local echo is enabled, characters will appear on the console as they
33 are typed. Can only be used on an input Console. */
34 void set_local_echo(bool);
36 /** If line buffering is enabled, input will only be available when a
37 newline is encountered. On some systems, this may also enable line editing.
38 Can only be used on an input Console.
40 void set_line_buffer(bool);
42 virtual Handle get_event_handle();
44 virtual unsigned do_write(const char *, unsigned);
45 virtual unsigned do_read(char *, unsigned);
47 static Console &instance(unsigned);