10 #ifndef TEUCHOS_VERBOSE_OBJECT_HPP
11 #define TEUCHOS_VERBOSE_OBJECT_HPP
14 #include "Teuchos_FancyOStream.hpp"
104 virtual std::string getLinePrefix()
const;
124 virtual OSTab getOSTab(
const int tabs = 1,
const std::string &linePrefix =
"")
const;
132 void initializeVerboseObjectBase(
144 virtual void informUpdatedVerbosityState()
const;
148 std::string thisLinePrefix_;
152 #pragma warning(push)
153 #pragma warning(disable:4251)
201 template<
class ObjectType>
280 template<
class ObjectType>
289 verboseObject_(verboseObject),
292 if(verboseObject_.get()) {
293 oldOStream_ = verboseObject_->getOStream();
294 oldVerbLevel_ = verboseObject_->getVerbLevel();
295 verboseObject_->setOStream(newOStream);
296 verboseObject_->setVerbLevel(newVerbLevel);
302 if(verboseObject_.get()) {
303 verboseObject_->setOStream(oldOStream_);
304 verboseObject_->setVerbLevel(oldVerbLevel_);
330 template<
class ObjectType>
333 privateDefaultVerbLevel() = defaultVerbLevel;
337 template<
class ObjectType>
340 return privateDefaultVerbLevel();
347 template<
class ObjectType>
358 template<
class ObjectType>
364 thisVerbLevel_ = verbLevel;
365 this->initializeVerboseObjectBase(oStream);
369 template<
class ObjectType>
373 thisVerbLevel_ = verbLevel;
374 informUpdatedVerbosityState();
379 template<
class ObjectType>
385 thisOverridingVerbLevel_ = verbLevel;
386 informUpdatedVerbosityState();
394 template<
class ObjectType>
398 return thisOverridingVerbLevel_;
400 return getDefaultVerbLevel();
401 return thisVerbLevel_;
408 template<
class ObjectType>
412 return defaultVerbLevel;
419 #endif // TEUCHOS_VERBOSE_OBJECT_HPP
Generate output as defined by the object.
static void setDefaultVerbLevel(const EVerbosityLevel defaultVerbLevel)
Set the default verbosity level.
EVerbosityLevel
Verbosity level.
Tabbing class for helping to create formated, indented output for a basic_FancyOStream object...
void initializeVerboseObject(const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
Initialize the VerboseObject.
Set and release a stream and verbosity level.
VerboseObjectTempState(const RCP< const VerboseObject< ObjectType > > &verboseObject, const RCP< FancyOStream > &newOStream, const EVerbosityLevel newVerbLevel)
Templated base class for objects that can print their activities to a stream and have a verbosity lev...
static EVerbosityLevel getDefaultVerbLevel()
Get the default verbosity level.
Non-templated base class for objects that can print their activities to a stream. ...
virtual const VerboseObject & setVerbLevel(const EVerbosityLevel verbLevel) const
Set this object's verbosity level.
VerboseObject(const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
Constructor: calls initializeVerboseObject().
Smart reference counting pointer class for automatic garbage collection.
~VerboseObjectTempState()
virtual EVerbosityLevel getVerbLevel() const
Get the verbosity level.
Reference-counted pointer class and non-member templated function implementations.
virtual const VerboseObject & setOverridingVerbLevel(const EVerbosityLevel verbLevel) const
Set the overriding verbosity level for *this object.