#include <console.h>
Inheritance diagram for ConsoleInput::

Public Methods | |
| ConsoleInput (char *readFile, CallBackObj *toCall) | |
| initialize hardware console input. More... | |
| ~ConsoleInput () | |
| clean up console emulation. More... | |
| char | GetChar () |
| Poll the console input. If a char is available, return it. Otherwise, return EOF. "callWhenAvail" is called whenever there is a char to be gotten. More... | |
| void | CallBack () |
| Invoked when a character arrives from the keyboard. More... | |
Private Attributes | |
| int | readFileNo |
| UNIX file emulating the keyboard. More... | |
| CallBackObj* | callWhenAvail |
| Interrupt handler to call when there is a char to be read. More... | |
| char | incoming |
| Contains the character to be read, if there is one available. Otherwise contains EOF. More... | |
Definition at line 43 of file console.h.
|
|
initialize hardware console input. ConsoleInput::ConsoleInput Initialize the simulation of the input for a hardware console device. "readFile" -- UNIX file simulating the keyboard (NULL -> use stdin) "toCall" is the interrupt handler to call when a character arrives from the keyboard Definition at line 28 of file console.cc. |
|
|
clean up console emulation. ConsoleInput::~ConsoleInput Clean up console input emulation Definition at line 48 of file console.cc. |
|
|
Invoked when a character arrives from the keyboard. ConsoleInput::CallBack() Simulator calls this when a character may be available to be read in from the simulated keyboard (eg, the user typed something). First check to make sure character is available. Then invoke the "callBack" registered by whoever wants the character. Reimplemented from CallBackObj. Definition at line 65 of file console.cc. |
|
|
Poll the console input. If a char is available, return it. Otherwise, return EOF. "callWhenAvail" is called whenever there is a char to be gotten. ConsoleInput::GetChar() Read a character from the input buffer, if there is any there. Either return the character, or EOF if none buffered. Definition at line 89 of file console.cc. Referenced by SynchConsoleInput::GetChar().
|
|
|
Interrupt handler to call when there is a char to be read.
|
|
|
Contains the character to be read, if there is one available. Otherwise contains EOF.
|
|
|
UNIX file emulating the keyboard.
|
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001