115 void setConfigValues();
116 void commandHistoryOffsetChanged();
117 void commandHistoryLengthChanged();
124 {
return this->inputBuffer_; }
126 void setCursorPosition(
unsigned int cursor);
127 unsigned int getCursorPosition()
const;
131 typedef std::list<std::pair<std::string, LineType>>
LineList;
132 LineList::const_iterator getNewestLineIterator()
const;
133 LineList::const_iterator getEndIterator()
const;
141 {
return this->outputLines_.size(); }
144 {
return this->scrollPosition_; }
156 virtual void devModeChanged(
bool value)
override;
164 void configureInputBuffer();
169 void hintAndComplete();
178 void historySearchUp();
179 void historySearchDown();
185 template <
void (ShellListener::*F)()>
188 for (std::list<ShellListener*>::const_iterator it = this->listeners_.begin(); it != this->listeners_.end(); )
unsigned int historyPosition_
If the user scrolls through the history of entered commands (stored in commandHistory_), this contains the currently viewed history entry.
Definition: Shell.h:197
Output level, used to notify the user about the program's state.
Definition: OutputDefinitions.h:93
static unsigned int cacheSize_s
The maximum cache size of the CommandExecutor - this is stored here for better readability of the con...
Definition: Shell.h:204
LineList::const_iterator scrollIterator_
An iterator to an entry of the list of output-lines, changes if the user scrolls through the output i...
Definition: Shell.h:195
unsigned int scrollPosition_
The number of the line that is currently being referenced by scrollIterator_.
Definition: Shell.h:196
std::list< ShellListener * > listeners_
The registered shell listeners.
Definition: Shell.h:192
std::vector< std::string > commandHistory_
The history of commands that were entered by the user.
Definition: Shell.h:203
std::list< std::pair< std::string, LineType > > LineList
Definition: Shell.h:131
virtual void linesChanged()
Called if all output-lines have changed.
Definition: Shell.h:67
virtual void cursorChanged()
Called if the cursor in the input line has changed.
Definition: Shell.h:70
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
Output level, usually not visible, used for unimportant debug information.
Definition: OutputDefinitions.h:99
Output level, used for warnings which are important for developers.
Definition: OutputDefinitions.h:96
InputBuffer * getInputBuffer()
Returns the input buffer which is needed by the user to enter text into the shell.
Definition: Shell.h:123
virtual void exit()
Called if the console should be closed.
Definition: Shell.h:72
Informs about changes in the Development Mode.
Definition: CoreConfig.h:74
Output level, used for messages directed to the user (e.g. "Press any key to continue") ...
Definition: OutputDefinitions.h:89
The Shell is the logical component of the console that displays output to the user and allows him to ...
Definition: Shell.h:86
Output level, usually not visible, used for unimportant debug information (even less important than v...
Definition: OutputDefinitions.h:101
OutputLevel
Output levels define type and importance of an output message.
Definition: OutputDefinitions.h:84
Output level, used to log the program's internal state in the log file.
Definition: OutputDefinitions.h:97
Output level, used for error messages which are important for developers.
Definition: OutputDefinitions.h:95
Definition: InputPrereqs.h:91
static unsigned int getCacheSize()
Returns the cache size that is actually used in CommandExecutor, but placed here for better readabili...
Definition: Shell.h:147
Output level, used for error messages which are important for the user.
Definition: OutputDefinitions.h:91
virtual void inputChanged()
Called if the input has changed.
Definition: Shell.h:69
unsigned int maxHistoryLength_
The maximum number of saved commands.
Definition: Shell.h:201
Output level, used for temporary debug output while writing code.
Definition: OutputDefinitions.h:90
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI() command(const std::string &fragment)
Returns a list of commands and groups and also supports auto-completion of the arguments of these com...
Definition: ArgumentCompletionFunctions.cc:178
void updateListeners()
Iterates through all registered shell listeners and calls the function F.
Definition: Shell.h:186
#define _CoreExport
Definition: CorePrereqs.h:61
const bool bScrollable_
If true, the user can scroll through the output-lines.
Definition: Shell.h:198
Declaration of the BaseWriter class, the base of all output writers.
unsigned int getScrollPosition() const
Returns the line which is currently viewed if the user scrolls through the older output-lines in the ...
Definition: Shell.h:143
Output level, usually not visible, used for unimportant debug information (less important than verbos...
Definition: OutputDefinitions.h:100
BaseWriter is an output listener and makes the accepted output levels and contexts configurable...
Definition: BaseWriter.h:65
unsigned int getNumLines() const
Returns the number of output-lines that are displayed in the shell.
Definition: Shell.h:140
InputBuffer * inputBuffer_
The input buffer that is needed by the user to enter text.
Definition: Shell.h:193
LineType
Defines the type of a line of text in the Shell - some types depend on the output level...
Definition: Shell.h:90
virtual void lineAdded()
Called if a new line was added to the output.
Definition: Shell.h:68
An interface, used to get a notification if the state of the Shell changes.
Definition: Shell.h:58
Output level, used to log information about the program's progress in the log file.
Definition: OutputDefinitions.h:98
Output level, used for warnings which are important for the user.
Definition: OutputDefinitions.h:92
unsigned int historyOffset_
The command history is a circular buffer, this variable defines the current write-offset.
Definition: Shell.h:202
virtual void executed()
Called if a command from the input line was executed.
Definition: Shell.h:71
LineList outputLines_
A list of all output-lines that were displayed in the shell so far.
Definition: Shell.h:194
Output level, used to provide the user with additional progress information.
Definition: OutputDefinitions.h:94