]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/console.h
Use an enum rather than plain integers to distinguish Console instances
[libs/core.git] / source / io / console.h
index 6d6c788780f70887de6d0571cb15ece611dfaf0f..5b4158fc90b533a96d7399da08d41d45b7887b30 100644 (file)
@@ -14,10 +14,19 @@ instead.
 */
 class Console: public EventObject
 {
+public:
+       enum Stream
+       {
+               INPUT = 0,
+               OUTPUT = 1,
+               ERROR = 2
+       };
+
 private:
+       Stream stream;
        Handle handle;
 
-       Console(unsigned);
+       Console(Stream);
 public:
        ~Console();
 
@@ -44,7 +53,7 @@ protected:
 public:
        virtual const Handle &get_event_handle() { return handle; }
 
-       static Console &instance(unsigned);
+       static Console &instance(Stream);
 };
 
 extern Console &cin;