|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Templated base class for objects that can print their activities to a stream and have a verbosity level. More...
#include <Teuchos_VerboseObject.hpp>

Static Private Member Functions | |
| static EVerbosityLevel & | privateDefaultVerbLevel () |
Private Attributes | |
| EVerbosityLevel | thisVerbLevel_ |
| EVerbosityLevel | thisOverridingVerbLevel_ |
Related Functions | |
(Note that these are not member functions.) | |
| TEUCHOS_LIB_DLL_EXPORT RCP < const ParameterList > | getValidVerboseObjectSublist () |
| Return the sublist of valid parameters for the "VerboseObject" sublist. | |
| TEUCHOS_LIB_DLL_EXPORT void | setupVerboseObjectSublist (ParameterList *paramList) |
| Setup a sublist called "VerboseObject" in the given parameter list. | |
| TEUCHOS_LIB_DLL_EXPORT void | readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel) |
| Read the parameters in the "VerboseObject" sublist and set them on the given VerboseObject. | |
| template<class ObjectType > | |
| void | readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject) |
| Read the parameters in the "VerboseObject" sublist and set them on the given VerboseObject. | |
Public static member functions | |
| static void | setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel) |
| Set the default verbosity level. | |
| static EVerbosityLevel | getDefaultVerbLevel () |
| Get the default verbosity level. | |
Constructors/Initializers | |
| VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) | |
Calls initializeVerboseObject(). | |
| virtual void | initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null) |
Calls initializeVerboseObject(). | |
| virtual const VerboseObject & | setVerbLevel (const EVerbosityLevel verbLevel) const |
Set the verbosity level for *this object. | |
| virtual const VerboseObject & | setOverridingVerbLevel (const EVerbosityLevel verbLevel) const |
Set the overriding verbosity level for *this object. | |
Query functions | |
| virtual EVerbosityLevel | getVerbLevel () const |
| Get the verbosity level. | |
Templated base class for objects that can print their activities to a stream and have a verbosity level.
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() . In addition, each object, by default, has a verbosity level that is shared by all objects (set using setDefaultVerbosityLevel()) or can be set on an object-by-object basis using setVerbLevel().
The output stream type is FancyOStream which allows for automated indentation (using the OSTab class) and has other useful features.
Note that setOStream() and setVerbLevel() are actually declared as const functions. This is to allow a client to temporarily change the stream and verbosity level. To do this saftely, use the class VerboseObjectTempState which will revert the output state after it is destroyed.
Definition at line 219 of file Teuchos_VerboseObject.hpp.
| Teuchos::VerboseObject< ObjectType >::VerboseObject | ( | const EVerbosityLevel | verbLevel = VERB_DEFAULT, |
| const RCP< FancyOStream > & | oStream = Teuchos::null |
||
| ) | [explicit] |
Calls initializeVerboseObject().
Definition at line 362 of file Teuchos_VerboseObject.hpp.
| void Teuchos::VerboseObject< ObjectType >::setDefaultVerbLevel | ( | const EVerbosityLevel | defaultVerbLevel | ) | [static] |
Set the default verbosity level.
If not called, then the default verbosity level is VERB_DEFAULT
Definition at line 345 of file Teuchos_VerboseObject.hpp.
| EVerbosityLevel Teuchos::VerboseObject< ObjectType >::getDefaultVerbLevel | ( | ) | [static] |
Get the default verbosity level.
Definition at line 352 of file Teuchos_VerboseObject.hpp.
| void Teuchos::VerboseObject< ObjectType >::initializeVerboseObject | ( | const EVerbosityLevel | verbLevel = VERB_DEFAULT, |
| const RCP< FancyOStream > & | oStream = Teuchos::null |
||
| ) | [virtual] |
Calls initializeVerboseObject().
Definition at line 373 of file Teuchos_VerboseObject.hpp.
| const VerboseObject< ObjectType > & Teuchos::VerboseObject< ObjectType >::setVerbLevel | ( | const EVerbosityLevel | verbLevel | ) | const [virtual] |
Set the verbosity level for *this object.
This function is supposed by called by general clients to set the output level according to some general logic in the code.
Definition at line 385 of file Teuchos_VerboseObject.hpp.
| const VerboseObject< ObjectType > & Teuchos::VerboseObject< ObjectType >::setOverridingVerbLevel | ( | const EVerbosityLevel | verbLevel | ) | const [virtual] |
Set the overriding verbosity level for *this object.
This function is supposed to be called by special clients that want to set the output level in a way that will not be overridden by setOStream().
Definition at line 395 of file Teuchos_VerboseObject.hpp.
| EVerbosityLevel Teuchos::VerboseObject< ObjectType >::getVerbLevel | ( | ) | const [virtual] |
Get the verbosity level.
Definition at line 409 of file Teuchos_VerboseObject.hpp.
| EVerbosityLevel & Teuchos::VerboseObject< ObjectType >::privateDefaultVerbLevel | ( | ) | [static, private] |
Definition at line 423 of file Teuchos_VerboseObject.hpp.
| TEUCHOS_LIB_DLL_EXPORT RCP< const ParameterList > getValidVerboseObjectSublist | ( | ) | [related] |
Return the sublist of valid parameters for the "VerboseObject" sublist.
This function need not be directly called by clients since the function setupVerboseObjectSublist() sets up the sublist automatically.
| TEUCHOS_LIB_DLL_EXPORT void setupVerboseObjectSublist | ( | ParameterList * | paramList | ) | [related] |
Setup a sublist called "VerboseObject" in the given parameter list.
| paramList | [in/out] The parameter list hat the "VerboseObject" sublist will be added to |
Preconditions:
paramList!=0 | TEUCHOS_LIB_DLL_EXPORT void readVerboseObjectSublist | ( | ParameterList * | paramList, |
| RCP< FancyOStream > * | oStream, | ||
| EVerbosityLevel * | verbLevel | ||
| ) | [related] |
Read the parameters in the "VerboseObject" sublist and set them on the given VerboseObject.
| paramList | [in/out] On input, contains the user's parameter list for the given objet for which "VerboseObject" can be a sublist of. |
| oStream | [out] The oStream object to be used. On output, oStream->get()!=0 if an output stream was specified by the parameter sublist. |
| verbLevel | [out] The verbosity level to be used. On output, *verbLevel gives the verbosity level set in the parameter list. If no verbosity level was set, then a value of *verbLevel==VERB_DEFAULT will be set on return. |
Preconditions:
oStream!=0 verbLevel!=0 | void readVerboseObjectSublist | ( | ParameterList * | paramList, |
| VerboseObject< ObjectType > * | verboseObject | ||
| ) | [related] |
Read the parameters in the "VerboseObject" sublist and set them on the given VerboseObject.
| paramList | [in/out] On input, contains the user's parameter list for the given object of which "VerboseObject" can be a sublist. |
| verboseObject | [in/out] The verbose object that will have its verbosity level and/or output stream set. |
This function just calls the above nontemplated readVerboseObjectSublist() to validate and and read the verbosity and output stream from the "VerboseObject" sublist.
EVerbosityLevel Teuchos::VerboseObject< ObjectType >::thisVerbLevel_ [mutable, private] |
Definition at line 284 of file Teuchos_VerboseObject.hpp.
EVerbosityLevel Teuchos::VerboseObject< ObjectType >::thisOverridingVerbLevel_ [mutable, private] |
Definition at line 285 of file Teuchos_VerboseObject.hpp.
1.7.6.1