Changeset 1502 for code/trunk/src/core/OutputHandler.h
- Timestamp:
- Jun 1, 2008, 3:54:20 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/OutputHandler.h
r1064 r1502 44 44 #include <string> 45 45 46 #include "OutputBuffer.h" 47 46 48 namespace orxonox 47 49 { … … 64 66 { OutputHandler::getOutStream().setOutputLevel(0); OutputHandler::getOutStream().output(text + "\n"); return text; } 65 67 68 /** @brief Puts an error on the outstream. @param text The text */ 69 static inline std::string error(const std::string& text) 70 { OutputHandler::getOutStream().setOutputLevel(1); OutputHandler::getOutStream().output(text + "\n"); return text; } 71 72 /** @brief Puts a warning on the outstream. @param text The text */ 73 static inline std::string warning(const std::string& text) 74 { OutputHandler::getOutStream().setOutputLevel(2); OutputHandler::getOutStream().output(text + "\n"); return text; } 75 76 /** @brief Puts an info on the outstream. @param text The text */ 77 static inline std::string info(const std::string& text) 78 { OutputHandler::getOutStream().setOutputLevel(3); OutputHandler::getOutStream().output(text + "\n"); return text; } 79 80 /** @brief Puts some debug output on the outstream. @param text The text */ 81 static inline std::string debug(const std::string& text) 82 { OutputHandler::getOutStream().setOutputLevel(4); OutputHandler::getOutStream().output(text + "\n"); return text; } 83 66 84 /** @brief Returns a reference to the logfile. @return The logfile */ 67 85 inline std::ofstream& getLogfile() … … 77 95 78 96 static int getSoftDebugLevel(OutputHandler::OutputDevice device); 97 98 OutputBuffer& getShellOutputBuffer(); 79 99 80 100 template <class T> … … 138 158 } 139 159 160 if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Shell) >= this->outputLevel_) 161 OutputHandler::getOutStream().getShellOutputBuffer() << output; 162 140 163 return *this; 141 164 } … … 159 182 } 160 183 184 if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Shell) >= out.getOutputLevel()) 185 OutputHandler::getOutStream().getShellOutputBuffer() << output; 186 161 187 return out; 162 188 }
Note: See TracChangeset
for help on using the changeset viewer.