Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Non-templated base class for objects that can print their activities to a stream. More...
#include <Teuchos_VerboseObject.hpp>
Protected Member Functions | |
void | initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) |
Calls initializeVerboseObject() . More... | |
virtual void | informUpdatedVerbosityState () const |
Function that is called whenever the verbosity state is updated. More... | |
Static Private Member Functions | |
static RCP< FancyOStream > & | privateDefaultOStream () |
Private Attributes | |
std::string | thisLinePrefix_ |
RCP< FancyOStream > | thisOStream_ |
RCP< FancyOStream > | thisOverridingOStream_ |
Public static member functions | |
static void | setDefaultOStream (const RCP< FancyOStream > &defaultOStream) |
Set the default output stream object. More... | |
static RCP< FancyOStream > | getDefaultOStream () |
Get the default output stream object. More... | |
Constructors/Initializers | |
virtual | ~VerboseObjectBase () |
VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null) | |
Calls initializeVerboseObject() . More... | |
virtual const VerboseObjectBase & | setOStream (const RCP< FancyOStream > &oStream) const |
The output stream for *this object. More... | |
virtual const VerboseObjectBase & | setOverridingOStream (const RCP< FancyOStream > &oStream) const |
Set the overriding the output stream for *this object. More... | |
virtual VerboseObjectBase & | setLinePrefix (const std::string &linePrefix) |
Set line prefix name for this object. More... | |
Query functions | |
virtual RCP< FancyOStream > | getOStream () const |
Return the output stream to be used for out for *this object. More... | |
virtual RCP< FancyOStream > | getOverridingOStream () const |
Return the the overriding output stream if set. More... | |
virtual std::string | getLinePrefix () const |
Get the line prefix for this object. More... | |
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. More... | |
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 34 of file Teuchos_VerboseObject.hpp.
|
virtual |
Definition at line 52 of file Teuchos_VerboseObject.cpp.
|
explicit |
Calls initializeVerboseObject()
.
Definition at line 59 of file Teuchos_VerboseObject.cpp.
|
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 36 of file Teuchos_VerboseObject.cpp.
|
static |
Get the default output stream object.
Definition at line 45 of file Teuchos_VerboseObject.cpp.
|
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.
Definition at line 77 of file Teuchos_VerboseObject.cpp.
|
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()
.
Definition at line 86 of file Teuchos_VerboseObject.cpp.
|
virtual |
Set line prefix name for this object.
Definition at line 97 of file Teuchos_VerboseObject.cpp.
|
virtual |
Return the output stream to be used for out for *this
object.
Definition at line 109 of file Teuchos_VerboseObject.cpp.
|
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()
.
Definition at line 120 of file Teuchos_VerboseObject.cpp.
|
virtual |
Get the line prefix for this object.
Definition at line 126 of file Teuchos_VerboseObject.cpp.
|
virtual |
Create a tab object which sets the number of tabs and optionally the line prefix.
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 135 of file Teuchos_VerboseObject.cpp.
|
protected |
Calls initializeVerboseObject()
.
Definition at line 68 of file Teuchos_VerboseObject.cpp.
|
protectedvirtual |
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.
Definition at line 149 of file Teuchos_VerboseObject.cpp.
|
staticprivate |
Definition at line 20 of file Teuchos_VerboseObject.cpp.
|
private |
Definition at line 148 of file Teuchos_VerboseObject.hpp.
|
mutableprivate |
Definition at line 155 of file Teuchos_VerboseObject.hpp.
|
mutableprivate |
Definition at line 156 of file Teuchos_VerboseObject.hpp.