Teuchos::VerboseObjectBase Class Reference
[Teuchos Outputting Utilities]

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

#include <Teuchos_VerboseObject.hpp>

Inheritance diagram for Teuchos::VerboseObjectBase:

Teuchos::VerboseObject< ObjectType > List of all members.

Public Member Functions

Constructors/Initializers
virtual ~VerboseObjectBase ()
 
 VerboseObjectBase (const RefCountPtr< FancyOStream > &oStream=Teuchos::null)
 Calls initializeVerboseObject().
virtual void initializeVerboseObjectBase (const RefCountPtr< FancyOStream > &oStream=Teuchos::null)
 Calls initializeVerboseObject().
virtual const VerboseObjectBasesetOStream (const RefCountPtr< FancyOStream > &oStream) const
 Override the output stream for *this object.
virtual VerboseObjectBasesetLinePrefix (const std::string &linePrefix)
 Set line prefix name for this object.
Query functions
virtual RefCountPtr< FancyOStreamgetOStream () const
 Return the output stream to be used.
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.

Static Public Member Functions

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

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.

Examples:

FancyOutputting_test.cpp.

Definition at line 51 of file Teuchos_VerboseObject.hpp.


Constructor & Destructor Documentation

virtual Teuchos::VerboseObjectBase::~VerboseObjectBase  )  [inline, virtual]
 

Definition at line 73 of file Teuchos_VerboseObject.hpp.

Teuchos::VerboseObjectBase::VerboseObjectBase const RefCountPtr< FancyOStream > &  oStream = Teuchos::null  )  [explicit]
 

Calls initializeVerboseObject().

Definition at line 63 of file Teuchos_VerboseObject.cpp.


Member Function Documentation

void Teuchos::VerboseObjectBase::setDefaultOStream const RefCountPtr< 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.

Definition at line 50 of file Teuchos_VerboseObject.cpp.

RefCountPtr< FancyOStream > Teuchos::VerboseObjectBase::getDefaultOStream  )  [static]
 

Get the default output stream object.

Examples:
FancyOutputting_test.cpp.

Definition at line 56 of file Teuchos_VerboseObject.cpp.

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

Calls initializeVerboseObject().

Definition at line 70 of file Teuchos_VerboseObject.cpp.

const VerboseObjectBase & Teuchos::VerboseObjectBase::setOStream const RefCountPtr< FancyOStream > &  oStream  )  const [virtual]
 

Override the output stream for *this object.

Definition at line 77 of file Teuchos_VerboseObject.cpp.

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

Set line prefix name for this object.

Definition at line 83 of file Teuchos_VerboseObject.cpp.

RefCountPtr< FancyOStream > Teuchos::VerboseObjectBase::getOStream  )  const [virtual]
 

Return the output stream to be used.

If setOStream(

Definition at line 92 of file Teuchos_VerboseObject.cpp.

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

Get the line prefix for this object.

Definition at line 99 of file Teuchos_VerboseObject.cpp.

OSTab 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() )

Definition at line 106 of file Teuchos_VerboseObject.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:30:33 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1