#include <Teuchos_Describable.hpp>
Inheritance diagram for Teuchos::Describable:

Public Member Functions | |
Public virtual member functions | |
| virtual std::string | description () const |
| Return a simple one-line description of this object. | |
| virtual void | describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
Print the object with some verbosity level to an FancyOStream object. | |
Static Public Attributes | |
| const EVerbosityLevel | verbLevel_default = VERB_DEFAULT |
Default value for verLevel in description(). | |
Related Functions | |
| (Note that these are not member functions.) | |
| DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
| Describable output stream manipulator. | |
| std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
| Output stream operator for Describable manipulator. | |
This base class is designed to be a minimally invasive approach for allowing subclasses to optionally provide detailed debug-style information about their current state. This interface has just two virtual member functions, describe(void) and description(), which both have default implementations. The shorter version description() (which takes no arguments and returns an std::string object) is meant for very short one-line descriptions while the longer version describe() takes and returns a FancyOStream object and is designed for more detailed multi-line formated output.
Since both of these functions have reasonable default implementations, when a subclass inherits from this base class, no virtual functions need to be overridden to start with. However, when debugging time comes, one or both of these functions should be overridden to provide more useful information.
This interface derives from the LabeledObject interface and therefore a user can set an object-specific label on every Describable object that will be incorporated in the the description of the object.
ToDo: Include an example/testing function for a few different use cases to demonstrate how to use this interface properly.
Definition at line 67 of file Teuchos_Describable.hpp.
|
|
Return a simple one-line description of this object.
The default implementation just returns Reimplemented in Teuchos::MpiComm< Ordinal >, and Teuchos::SerialComm< Ordinal >. Definition at line 39 of file Teuchos_Describable.cpp. |
|
||||||||||||
|
Print the object with some verbosity level to an
verbLevel mean in relation to the amount of output produced.
It is expected that the subclass implementation will tab the output one increment using the A default implementation of this function is provided that simply performs: OSTab tab(out); return out << this->description() << std::endl; A subclass should override this function to provide more interesting and more useful information about the object. Definition at line 51 of file Teuchos_Describable.cpp. |
|
||||||||||||
|
Describable output stream manipulator.
This simple function allows you to insert output from
void someFunc( const Teuchos::Describable &obj ) { ... std::cout << "The object is described as " << describe(obj,Teuchos::VERB_MEDIUM); ... } Definition at line 169 of file Teuchos_Describable.hpp. |
|
||||||||||||
|
Output stream operator for Describable manipulator. To call this function use something like:
void someFunc( const Teuchos::Describable &obj ) { ... std::cout << "The object is described as " << describe(obj,Teuchos::VERB_MEDIUM); ... }
Note: The input Definition at line 205 of file Teuchos_Describable.hpp. |
|
|
Default value for
Definition at line 36 of file Teuchos_Describable.cpp. |
1.3.9.1