Changeset 8729 for code/trunk/src/libraries/core/command/Shell.h
- Timestamp:
- Jul 4, 2011, 2:47:44 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
code/trunk/src/libraries/core/command/Shell.h
r7401 r8729 49 49 50 50 #include "util/OutputHandler.h" 51 #include "core/Core.h" 51 52 #include "core/OrxonoxClass.h" 52 #include "core/input/InputBuffer.h"53 53 54 54 namespace orxonox … … 85 85 Different graphical consoles build upon a Shell, for example InGameConsole and IOConsole. 86 86 */ 87 class _CoreExport Shell : virtual public OrxonoxClass, public OutputListener87 class _CoreExport Shell : public OutputListener, public DevModeListener 88 88 { 89 89 public: … … 91 91 enum LineType 92 92 { 93 TDebug = OutputLevel::TDebug, 93 94 None = OutputLevel::None, 94 95 Warning = OutputLevel::Warning, … … 118 119 119 120 void setCursorPosition(unsigned int cursor); 120 /// Returns the current position of the cursor in the input buffer. 121 inline unsigned int getCursorPosition() const 122 { return this->inputBuffer_->getCursorPosition(); } 123 124 /// Returns the current content of the input buffer (the text which was entered by the user) 125 inline const std::string& getInput() const 126 { return this->inputBuffer_->get(); } 121 unsigned int getCursorPosition() const; 122 123 const std::string& getInput() const; 127 124 128 125 typedef std::list<std::pair<std::string, LineType> > LineList; … … 146 143 private: 147 144 Shell(const Shell& other); 145 146 // DevModeListener 147 void devModeChanged(bool value); 148 148 149 149 void addToHistory(const std::string& command); … … 197 197 unsigned int historyOffset_; ///< The command history is a circular buffer, this variable defines the current write-offset 198 198 std::vector<std::string> commandHistory_; ///< The history of commands that were entered by the user 199 int softDebugLevel_; ///< The maximum level of output that is displayed in the shell (will be passed to OutputListener to filter output)199 int debugLevel_; //!< The maximum level of output that is displayed in the shell (will be passed to OutputListener to filter output) 200 200 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 201 };
Note: See TracChangeset
for help on using the changeset viewer.