Changeset 8795 for code/branches/output/src/libraries/core/command/Shell.h
- Timestamp:
- Jul 29, 2011, 10:26:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/core/command/Shell.h
r8729 r8795 48 48 #include <vector> 49 49 50 #include "util/ OutputHandler.h"50 #include "util/output/BaseWriter.h" 51 51 #include "core/Core.h" 52 52 #include "core/OrxonoxClass.h" … … 78 78 @brief The Shell is the logical component of the console that displays output to the user and allows him to enter commands. 79 79 80 The Shell gathers output sent from Output Handler by inheriting from OutputListener.80 The Shell gathers output sent from OutputManager by inheriting from BaseWriter. 81 81 The output-lines are stored in the shell, so they can be displayed in a graphical 82 82 console. Additionally the Shell has an InputBuffer which is needed by the user to … … 85 85 Different graphical consoles build upon a Shell, for example InGameConsole and IOConsole. 86 86 */ 87 class _CoreExport Shell : public OutputListener, public DevModeListener87 class _CoreExport Shell : public BaseWriter, public DevModeListener 88 88 { 89 89 public: … … 91 91 enum LineType 92 92 { 93 TDebug = OutputLevel::TDebug, 94 None = OutputLevel::None, 95 Warning = OutputLevel::Warning, 96 Error = OutputLevel::Error, 97 Info = OutputLevel::Info, 98 Debug = OutputLevel::Debug, 99 Verbose = OutputLevel::Verbose, 100 Ultra = OutputLevel::Ultra, 93 DebugOutput = debug_output, 94 UserError = user_error, 95 UserWarning = user_warning, 96 UserStatus = user_status, 97 UserInfo = user_info, 98 InternalError = internal_error, 99 InternalWarning = internal_warning, 100 InternalStatus = internal_status, 101 InternalInfo = internal_info, 102 Verbose = verbose, 103 VerboseMore = verbose_more, 104 VerboseUltra = verbose_ultra, 105 Cout, 101 106 Input, 102 107 Command, … … 127 132 LineList::const_iterator getEndIterator() const; 128 133 129 void addOutput(const std::string& text, LineType type = None);134 void addOutput(const std::string& text, LineType type = DebugOutput); 130 135 void clearOutput(); 131 136 … … 150 155 const std::string& getFromHistory() const; 151 156 void clearInput(); 152 // OutputListener153 v oid outputChanged(intlevel);157 // BaseWriter 158 virtual void printLine(const std::string& line, OutputLevel level); 154 159 155 160 void configureInputBuffer(); … … 183 188 std::list<ShellListener*> listeners_; ///< The registered shell listeners 184 189 InputBuffer* inputBuffer_; ///< The input buffer that is needed by the user to enter text 185 std::stringstream outputBuffer_; ///< The output buffer that is used to retrieve lines of output from OutputListener186 bool bFinishedLastLine_; ///< Stores if the most recent output-line was terminated with a line-break or if more output is expected for this line187 190 LineList outputLines_; ///< A list of all output-lines that were displayed in the shell so far 188 191 LineList::const_iterator scrollIterator_; ///< An iterator to an entry of the list of output-lines, changes if the user scrolls through the output in the shell … … 197 200 unsigned int historyOffset_; ///< The command history is a circular buffer, this variable defines the current write-offset 198 201 std::vector<std::string> commandHistory_; ///< The history of commands that were entered by the user 199 intdebugLevel_; //!< The maximum level of output that is displayed in the shell (will be passed to OutputListener to filter output)202 OutputLevel debugLevel_; //!< The maximum level of output that is displayed in the shell (will be passed to OutputListener to filter output) 200 203 static unsigned int cacheSize_s; ///< The maximum cache size of the CommandExecutor - this is stored here for better readability of the config file and because CommandExecutor is no OrxonoxClass 201 204 };
Note: See TracChangeset
for help on using the changeset viewer.