diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-20 13:33:28 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-20 13:33:28 +0100 |
commit | 07a73aea7acbf0d9f9182bc3557583aa17af0000 (patch) | |
tree | 983e7b70b4d836c4050b8f350d7bd1e7250058b4 /Source/Library/Userland/Binding | |
parent | a804601188be682ce87e6a9591286e8c8ab2817d (diff) | |
download | Melon-07a73aea7acbf0d9f9182bc3557583aa17af0000.tar.gz Melon-07a73aea7acbf0d9f9182bc3557583aa17af0000.zip |
[not really working] Started work on OStream
Diffstat (limited to 'Source/Library/Userland/Binding')
-rw-r--r-- | Source/Library/Userland/Binding/VirtualTerminal.class.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/Library/Userland/Binding/VirtualTerminal.class.h b/Source/Library/Userland/Binding/VirtualTerminal.class.h index 70c6b23..df44124 100644 --- a/Source/Library/Userland/Binding/VirtualTerminal.class.h +++ b/Source/Library/Userland/Binding/VirtualTerminal.class.h @@ -6,10 +6,10 @@ #include <VirtualTerminal.iface.h> #include <Kbd.iface.h> -#include <String.class.h> +#include <OStream.proto.h> #include <WChar.class.h> -class VirtualTerminal : public RessourceCaller { +class VirtualTerminal : public RessourceCaller, public OStream { public: static VirtualTerminal getIn() { u32int id = RessourceCaller::sCall(VTIF_OBJTYPE, VTIF_SGETPRINVT); @@ -21,13 +21,13 @@ class VirtualTerminal : public RessourceCaller { } VirtualTerminal(u32int id) : RessourceCaller(id, VTIF_OBJTYPE) {} - void writeHex(u32int number) { + /*void writeHex(u32int number) { doCall(VTIF_WRITEHEX, number); } void writeDec(s64int number) { doCall(VTIF_WRITEDEC, (number >> 32), number); - } - void write(String s) { + }*/ + void write(const String &s) { doCall(VTIF_WRITE, (u32int)&s); } keypress_t getKeypress(bool show = true, bool block = true) { @@ -35,6 +35,7 @@ class VirtualTerminal : public RessourceCaller { return *ptr; } String readLine(bool show = true) { + flush(); return String::unserialize(doCall(VTIF_READLINE, (show ? 1 : 0))); } void setColor(u8int fg, u8int bg = 0xFF) { @@ -64,11 +65,6 @@ class VirtualTerminal : public RessourceCaller { void put(u8int line, u8int col, WChar c) { moveCursor(line, col); put(c); } - - inline VirtualTerminal& operator<<(const String& s) { write(s); return *this; } - inline VirtualTerminal& operator<<(s32int i) { writeDec(i); return *this; } - inline VirtualTerminal& operator<<(s64int i) { writeDec(i); return *this; } - inline VirtualTerminal& operator<<(u32int i) { writeHex(i); return *this; } }; #endif |