42 #ifndef TEUCHOS_VERBOSE_OBJECT_HPP
43 #define TEUCHOS_VERBOSE_OBJECT_HPP
46 #include "Teuchos_FancyOStream.hpp"
136 virtual std::string getLinePrefix()
const;
156 virtual OSTab getOSTab(
const int tabs = 1,
const std::string &linePrefix =
"")
const;
164 void initializeVerboseObjectBase(
176 virtual void informUpdatedVerbosityState()
const;
180 std::string thisLinePrefix_;
184 #pragma warning(push)
185 #pragma warning(disable:4251)
233 template<
class ObjectType>
312 template<
class ObjectType>
321 verboseObject_(verboseObject),
324 if(verboseObject_.get()) {
325 oldOStream_ = verboseObject_->getOStream();
326 oldVerbLevel_ = verboseObject_->getVerbLevel();
327 verboseObject_->setOStream(newOStream);
328 verboseObject_->setVerbLevel(newVerbLevel);
334 if(verboseObject_.get()) {
335 verboseObject_->setOStream(oldOStream_);
336 verboseObject_->setVerbLevel(oldVerbLevel_);
362 template<
class ObjectType>
365 privateDefaultVerbLevel() = defaultVerbLevel;
369 template<
class ObjectType>
372 return privateDefaultVerbLevel();
379 template<
class ObjectType>
390 template<
class ObjectType>
396 thisVerbLevel_ = verbLevel;
397 this->initializeVerboseObjectBase(oStream);
401 template<
class ObjectType>
405 thisVerbLevel_ = verbLevel;
406 informUpdatedVerbosityState();
411 template<
class ObjectType>
417 thisOverridingVerbLevel_ = verbLevel;
418 informUpdatedVerbosityState();
426 template<
class ObjectType>
430 return thisOverridingVerbLevel_;
432 return getDefaultVerbLevel();
433 return thisVerbLevel_;
440 template<
class ObjectType>
444 return defaultVerbLevel;
451 #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.