The console input interface. More...
Inheritance diagram for MAKLogger::DtLgrConsole:
Collaboration diagram for MAKLogger::DtLgrConsole:Public Member Functions | |
| DtLgrConsole (DtLogger &) | |
| virtual void | stop () |
| virtual void | run () |
| virtual void | setInputHistorySize (int size) |
| virtual int | inputHistorySize () const |
Static Public Member Functions | |
| static void | allocateConsole () |
| static void | deallocateConsole () |
| static void | shutdown () |
Protected Types | |
| typedef std::list< DtString > | StringList |
Protected Member Functions | |
| virtual void | printMessage (const DtString &message) |
| Prints a message to the console, and restores current input. | |
| virtual void | printFileDoesNotExistMessage (const DtString &filename) |
| Prints a file does not exist error message to the console. | |
| virtual void | printFileInvalidMessage (const DtString &filename) |
| Prints a file invalid error message to the console. | |
| virtual void | printInput (const DtString &input) |
| Prints a message to the console as input. | |
| virtual void | clearInput () |
| Overwrites the message on console and set input to empty string. | |
| bool | nonBlockingGetLine (DtString &input, bool &changed) |
| Tokenize the input and return an array of words. | |
| virtual void | processInput (const DtString &input) |
| Process the completed input line. | |
| virtual void | addInputToHistory (const DtString &input) |
| Called once input is entered. | |
| virtual DtString | getPreviousInput () |
| Gets the previous input in history and stores the current index. | |
| virtual DtString | getNextInput () |
| Gets the next input in history and stores the current index. | |
| void | sendShutdown () |
Static Protected Member Functions | |
| static DtString | dequote (const DtString &input) |
| Remove leading and trailing double quotes. | |
Protected Attributes | |
| volatile bool | myRunningFlag |
| DtString | myCurrentInput |
| int | myMaxInputHistorySize |
| StringList | myInputHistory |
| StringList::iterator | myCurrentHistoryInput |
| DtLgrFullInterface * | myInterface |
Static Protected Attributes | |
| static volatile bool | myHasConsole |
| static volatile DtLgrConsole * | theConsole |
The console input interface.
| virtual void MAKLogger::DtLgrConsole::addInputToHistory | ( | const DtString & | input | ) | [protected, virtual] |
Called once input is entered.
Pushes input to end of history and resets the current history index to the end.
| bool MAKLogger::DtLgrConsole::nonBlockingGetLine | ( | DtString & | input, |
| bool & | changed | ||
| ) | [protected] |
Tokenize the input and return an array of words.
virtual DtString* tokenize(const DtString& input,int& size_out); Get input appended to the string and return true if it has been terminated.