Changeset 6004 for code/branches/console/src/libraries/util/OutputHandler.h
- Timestamp:
- Oct 30, 2009, 12:39:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/libraries/util/OutputHandler.h
r5996 r6004 142 142 //! Returns the soft debug level for a device by its name @return The level or -1 if the listener was not found 143 143 int getSoftDebugLevel(const std::string& name) const; 144 //! Sets the soft debug level for a listener by its name 144 //! Sets the soft debug level for a listener by its name @remarks Only works for registered listeners! 145 145 void setSoftDebugLevel(const std::string& name, int level); 146 146 … … 231 231 : outputStream_(NULL) 232 232 , name_(name) 233 , softDebugLevel_(OutputLevel::Info) 233 234 {} 234 235 virtual ~OutputListener() {} 235 236 236 237 //! Gets called whenever output is put into the stream 237 virtual void outputChanged( ) {}238 virtual void outputChanged(int level) {} 238 239 //! Returns the name of this output listener 239 240 const std::string& getOutputListenerName() const { return this->name_; } 241 //! Returns the soft debug level of the listener 242 int getSoftDebugLevel() const { return this->softDebugLevel_; } 243 //! Sets the soft debug level of the listener 244 void setSoftDebugLevel(int level) 245 { 246 this->softDebugLevel_ = level; 247 OutputHandler::getInstance().setSoftDebugLevel(this->name_, level); 248 } 240 249 241 250 protected: … … 257 266 stream << output; 258 267 stream.flush(); 259 (*it)->outputChanged( );268 (*it)->outputChanged(this->outputLevel_); 260 269 } 261 270 }
Note: See TracChangeset
for help on using the changeset viewer.