CommandInterpreter.h Source File
Back to the index.
Go to the documentation of this file. 1 #ifndef COMMANDINTERPRETER_H
2 #define COMMANDINTERPRETER_H
107 bool RunCommand(
const string& command,
bool* pSuccess = NULL);
160 void ClearCurrentInputLineVisually();
173 bool TabComplete(
string& commandString,
size_t& cursorPosition,
174 bool visibleShowAvailable =
false);
192 bool TabCompleteWithSubname(
string& commandString,
193 size_t& cursorPosition,
bool visibleShowAvailable =
false);
220 bool RunComponentMethod(
const string& componentPathAndMethod,
221 const vector<string>& arguments);
228 void ShowAvailableWords(
const vector<string>& words);
230 void VariableAssignment(
const string& componentPath,
231 const string& variableName,
const string& expression);
247 string m_currentCommandString;
248 size_t m_currentCommandCursorPosition;
249 bool m_inEscapeSequence;
250 string m_escapeSequence;
251 int m_historyEntryToCopyFrom;
254 vector<string> m_commandHistory;
255 size_t m_commandHistoryInsertPosition;
256 size_t m_commandHistoryMaxSize;
260 string m_mayBeReexecuted;
264 #endif // COMMANDINTERPRETER_H
map< string, refcount_ptr< Command > > Commands
static void RunUnitTests(int &nSucceeded, int &nFailures)
bool AddKey(stringchar key)
Adds a character (keypress) to the current command buffer.
CommandInterpreter(GXemul *owner)
Constructs a CommandInterpreter.
void AddCommand(refcount_ptr< Command > command)
Adds a new Command to the command interpreter.
bool RunCommand(const string &command, bool *pSuccess=NULL)
Runs a command, given as a string.
const string & GetCurrentCommandBuffer() const
Retrieves the current command buffer.
const Commands & GetCommands() const
Gets a collection of all commands.
An interactive command interpreter, which run Commands.
Base class for unit testable classes.
int AddLineToCommandHistory(const string &command)
Adds a command line to the command history.
string GetHistoryLine(int nStepsBack) const
Retrieves a line from the command history.
void ReshowCurrentCommandBuffer()
Re-displays the current command buffer.
void ClearCurrentCommandBuffer()
Clears the current command buffer.
Generated on Tue Aug 25 2020 19:25:06 for GXemul by
1.8.18