Changeset 8801 for code/branches/output/src/libraries/core/command/Shell.cc
- Timestamp:
- Jul 30, 2011, 9:31:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/output/src/libraries/core/command/Shell.cc
r8799 r8801 33 33 34 34 #include "Shell.h" 35 36 #include <boost/preprocessor/stringize.hpp> 35 37 36 38 #include "util/Math.h" … … 48 50 namespace orxonox 49 51 { 52 #pragma message(__FILE__ "("BOOST_PP_STRINGIZE(__LINE__)") : Warning: TODO: add commands again, inspect tcl support (and remove boost include)") 50 53 // SetConsoleCommand("log", OutputHandler::log ); 51 54 // SetConsoleCommand("error", OutputHandler::error ).hide(); … … 251 254 252 255 /** 253 @brief Sends outputto the internal output buffer.256 @brief Adds multiple lines to the internal output buffer. 254 257 */ 255 258 void Shell::addOutput(const std::string& text, LineType type) 256 259 { 260 std::vector<std::string> lines; 261 vectorize(text, '\n', &lines); 262 263 for (size_t i = 0; i < lines.size(); ++i) 264 this->addLine(lines[i], type); 265 } 266 267 /** 268 @brief Adds a line to the internal output buffer. 269 */ 270 void Shell::addLine(const std::string& line, LineType type) 271 { 257 272 // yes it was - push the new line to the list 258 this->outputLines_.push_front(std::make_pair( text, static_cast<LineType>(type)));273 this->outputLines_.push_front(std::make_pair(line, static_cast<LineType>(type))); 259 274 260 275 // adjust the scroll position if needed … … 286 301 void Shell::printLine(const std::string& line, OutputLevel level) 287 302 { 288 this->add Output(line, static_cast<LineType>(level));303 this->addLine(line, static_cast<LineType>(level)); 289 304 } 290 305
Note: See TracChangeset
for help on using the changeset viewer.