#include <Teuchos_Describable.hpp>
Public Member Functions | |
| virtual | ~Describable () |
| | |
Public virtual member functions | |
| virtual std::string | description () const |
| Return a simple description (usually just one line) of this object. | |
| virtual std::ostream & | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default, const std::string leadingIndent=leadingIndent_default, const std::string indentSpacer=indentSpacer_default) const |
Print the object using given indentation with some verbosity level to an std::ostream object. | |
Static Public Attributes | |
| const EVerbosityLevel | verbLevel_default = VERB_DEFAULT |
Default value for verLevel in description(). | |
| const std::string | leadingIndent_default = "" |
Default value for leadingIndent in description(). | |
| const std::string | indentSpacer_default = " " |
Default value for indentSpacer in description(). | |
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 of describe(void) (which takes no arguments and returns an std::string object) is meant for very short descriptions while the longer version of description() takes and returns an std::ostream argument and is designed for more detailed formated output.
Since both of these description() 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.
ToDo: Include an example/testing function for a few different use cases to demonstrate how to use this interface properly.
Definition at line 68 of file Teuchos_Describable.hpp.
|
|
Definition at line 79 of file Teuchos_Describable.hpp. |
|
|
Return a simple description (usually just one line) of this object.
The default implementation just returns Definition at line 39 of file Teuchos_Describable.cpp. |
|
||||||||||||||||||||
|
Print the object using given indentation with some verbosity level to an
verbLevel mean in relation to the amount of output produced.A default implementation of this function is provided that simply performs: return out << leadingIndent << this->description() << std::endl; A subclass should override this function to provide more interesting and more useful information about the object. Definition at line 44 of file Teuchos_Describable.cpp. |
|
|
Default value for
Definition at line 33 of file Teuchos_Describable.cpp. |
|
|
Default value for
Definition at line 35 of file Teuchos_Describable.cpp. |
|
|
Default value for
Definition at line 37 of file Teuchos_Describable.cpp. |
1.3.9.1