Support Software for Vector Reduction/Transformation Operators Version of the Day
Protected Member Functions
RTOpPack::Teuchos::VerboseObjectBase Class Reference

Non-templated base class for objects that can print their activities to a stream. More...

#include <RTOpPack_SPMD_apply_op_def.hpp>

Inheritance diagram for RTOpPack::Teuchos::VerboseObjectBase:
Inheritance graph
[legend]

List of all members.

Protected Member Functions

virtual void informUpdatedVerbosityState () const
 Function that is called whenever the verbosity state is updated.

Public static member functions

static void setDefaultOStream (const RCP< FancyOStream > &defaultOStream)
 Set the default output stream object.
static RCP< FancyOStreamgetDefaultOStream ()
 Get the default output stream object.

Constructors/Initializers

virtual ~VerboseObjectBase ()
 
 VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 Calls initializeVerboseObject().
virtual void initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 Calls initializeVerboseObject().
virtual const VerboseObjectBasesetOStream (const RCP< FancyOStream > &oStream) const
 The output stream for *this object.
virtual const VerboseObjectBasesetOverridingOStream (const RCP< FancyOStream > &oStream) const
 Set the overriding the output stream for *this object.
virtual VerboseObjectBasesetLinePrefix (const std::string &linePrefix)
 Set line prefix name for this object.

Query functions

virtual RCP< FancyOStreamgetOStream () const
 Return the output stream to be used for out for *this object.
virtual RCP< FancyOStreamgetOverridingOStream () const
 Return the the overriding output stream if set.
virtual std::string getLinePrefix () const
 Get the line prefix for this object.

Utilities

virtual OSTab getOSTab (const int tabs=1, const std::string &linePrefix="") const
 Create a tab object which sets the number of tabs and optionally the line prefix.

Detailed Description

Non-templated base class for objects that can print their activities to a stream.

Objects that derive from this interface print to a default class-owned (i.e. static) output stream object (set using setDefaultOStream()) or the output stream can be set on an object-by-object basis using setOStream().

The output stream type is FancyOStream which allows for automated indentation (using the OSTab class) and has other useful features.

Definition at line 66 of file RTOpPack_SPMD_apply_op_def.hpp.


Constructor & Destructor Documentation

virtual RTOpPack::Teuchos::VerboseObjectBase::~VerboseObjectBase ( ) [virtual]

RTOpPack::Teuchos::VerboseObjectBase::VerboseObjectBase ( const RCP< FancyOStream > &  oStream = Teuchos::null) [explicit]

Calls initializeVerboseObject().


Member Function Documentation

static void RTOpPack::Teuchos::VerboseObjectBase::setDefaultOStream ( const RCP< FancyOStream > &  defaultOStream) [static]

Set the default output stream object.

If this function is not called, then a default stream based on std::cout is used.

static RCP<FancyOStream> RTOpPack::Teuchos::VerboseObjectBase::getDefaultOStream ( ) [static]

Get the default output stream object.

virtual void RTOpPack::Teuchos::VerboseObjectBase::initializeVerboseObjectBase ( const RCP< FancyOStream > &  oStream = Teuchos::null) [virtual]

Calls initializeVerboseObject().

virtual const VerboseObjectBase& RTOpPack::Teuchos::VerboseObjectBase::setOStream ( const RCP< FancyOStream > &  oStream) const [virtual]

The output stream for *this object.

This function is supposed by called by general clients to set the output stream according to some general logic in the code.

virtual const VerboseObjectBase& RTOpPack::Teuchos::VerboseObjectBase::setOverridingOStream ( const RCP< FancyOStream > &  oStream) const [virtual]

Set the overriding the output stream for *this object.

This function is supposed to be called by special clients that want to set the output stream in a way that will not be overridden by setOStream().

virtual VerboseObjectBase& RTOpPack::Teuchos::VerboseObjectBase::setLinePrefix ( const std::string &  linePrefix) [virtual]

Set line prefix name for this object.

virtual RCP<FancyOStream> RTOpPack::Teuchos::VerboseObjectBase::getOStream ( ) const [virtual]

Return the output stream to be used for out for *this object.

virtual RCP<FancyOStream> RTOpPack::Teuchos::VerboseObjectBase::getOverridingOStream ( ) const [virtual]

Return the the overriding output stream if set.

This is the output stream that will be returned from getOStream() regardless that stream is set by setOStream().

virtual std::string RTOpPack::Teuchos::VerboseObjectBase::getLinePrefix ( ) const [virtual]

Get the line prefix for this object.

virtual OSTab RTOpPack::Teuchos::VerboseObjectBase::getOSTab ( const int  tabs = 1,
const std::string &  linePrefix = "" 
) const [virtual]

Create a tab object which sets the number of tabs and optionally the line prefix.

Parameters:
tabs[in] The number of relative tabs to add (if tabs > 0) or remove (if tabs < 0). If tabs == OSTab::DISABLE_TABBING then tabbing will be turned off temporarily.
linePrefix[in] Sets a line prefix that overrides this->getLinePrefix().

The side effects of these changes go away as soon as the returned OSTab object is destroyed at the end of the block of code.

Returns OSTab( this->getOStream(), tabs, linePrefix.length() ? linePrefix : this->getLinePrefix() )

virtual void RTOpPack::Teuchos::VerboseObjectBase::informUpdatedVerbosityState ( ) const [protected, virtual]

Function that is called whenever the verbosity state is updated.

Subclasses can override this function to be informed whenever the verbosity state of *this object gets updated.

The default implementation simply does nothing.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends