diff options
author | Alexis211 <alexis211@gmail.com> | 2009-10-20 18:10:29 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-10-20 18:10:29 +0200 |
commit | 866580161b826443bed3862b8315cefd505de37c (patch) | |
tree | 23c3f87fe43d82c47af01c908d8a056785f9217f /Source/Kernel/VTManager/VirtualTerminal.proto.cpp | |
parent | 0cca2d68451849b5ea96a3620566fd0b42dde3c0 (diff) | |
download | Melon-866580161b826443bed3862b8315cefd505de37c.tar.gz Melon-866580161b826443bed3862b8315cefd505de37c.zip |
We now have call tables for ressources.
instead of adding calls to ressource in the constructor.
Diffstat (limited to 'Source/Kernel/VTManager/VirtualTerminal.proto.cpp')
-rw-r--r-- | Source/Kernel/VTManager/VirtualTerminal.proto.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/Kernel/VTManager/VirtualTerminal.proto.cpp b/Source/Kernel/VTManager/VirtualTerminal.proto.cpp index dfd8f84..348113d 100644 --- a/Source/Kernel/VTManager/VirtualTerminal.proto.cpp +++ b/Source/Kernel/VTManager/VirtualTerminal.proto.cpp @@ -4,13 +4,21 @@ #include <VirtualTerminal.iface.h> +call_t VirtualTerminal::m_callTable[] = { + CALL1(VTIF_WRITEHEX, &VirtualTerminal::writeHexSC), + CALL2(VTIF_WRITEDEC, &VirtualTerminal::writeDecSC), + CALL1(VTIF_WRITE, &VirtualTerminal::writeSC), + CALL1(VTIF_PUT, &VirtualTerminal::putSC), + CALL0(VTIF_READLINE, &VirtualTerminal::readLineSC), + CALL1(VTIF_SETCOLOR, &VirtualTerminal::setColorSC), + CALL1(VTIF_SETCSRLINE, &VirtualTerminal::setCursorLineSC), + CALL1(VTIF_SETCSRCOL, &VirtualTerminal::setCursorColSC), + CALL0(VTIF_ISBOXED, &VirtualTerminal::isBoxedSC), + CALL0(0, 0) +}; + VirtualTerminal::VirtualTerminal() : - Ressource(VT_IFACE_OBJTYPE), m_kbdMutex(false), m_kbdbuffMutex(false), m_kbdbuff() { - addCall1(VT_IFACE_WRITEHEX, (call1)&VirtualTerminal::writeHexSC); - addCall2(VT_IFACE_WRITEDEC, (call2)&VirtualTerminal::writeDecSC); - addCall1(VT_IFACE_WRITE, (call1)&VirtualTerminal::writeSC); - addCall1(VT_IFACE_PUT, (call1)&VirtualTerminal::putSC); - addCall0(VT_IFACE_READLINE, (call0)&VirtualTerminal::readLineSC); + Ressource(VTIF_OBJTYPE, m_callTable), m_kbdMutex(false), m_kbdbuffMutex(false), m_kbdbuff() { } VirtualTerminal::~VirtualTerminal() { |