|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/utility/report_stream.hpp>
Output stream with a configurable verbosity level.
It behaves like a std::ostream but each operator<<() call is conditional on the current verbosity level. It only emits output when the verbosity level is greater than zero. The verbosity level is set at construction time and can be (temporarily) reduced using operator()().
Definition at line 45 of file report_stream.hpp.
Public Member Functions | |
| report_stream (std::ostream &out_, int verbosity_=1) | |
| Construct a report stream from a reference to an ostream and a verbosity level. | |
| report_stream (std::ostream *out_, int verbosity_=1) | |
| Construct a report stream from a pointer to an ostream and a verbosity level. | |
| report_stream | operator() (int n) const |
| Return a child report stream whose verbosity has been reduced by \( n - 1 \). | |
| report_stream & | operator<< (std::ostream &(*manip)(std::ostream &)) |
| Streaming operator that accepts manipulators like std::endl. | |
| template<class T> | |
| report_stream & | operator<< (T const &x) |
| Streaming operator to write the given argument if the current verbosity is greater than zero. | |
|
inline |
Construct a report stream from a pointer to an ostream and a verbosity level.
| out_ | Pointer to the underlying std::ostream. |
| verbosity_ | Verbosity level. |
Definition at line 56 of file report_stream.hpp.
|
inline |
Construct a report stream from a reference to an ostream and a verbosity level.
| out_ | Reference to the underlying std::ostream. |
| verbosity_ | Verbosity level. |
Definition at line 64 of file report_stream.hpp.
|
inline |
Return a child report stream whose verbosity has been reduced by \( n - 1 \).
| n | Amount by which to lower the verbosity threshold. |
Definition at line 72 of file report_stream.hpp.
|
inline |
Streaming operator that accepts manipulators like std::endl.
| manip | Stream manipulator applied to the underlying ostream when verbosity is greater than zero. |
Definition at line 92 of file report_stream.hpp.
|
inline |
Streaming operator to write the given argument if the current verbosity is greater than zero.
| T | Type to be written. |
| x | Object to write to the underlying ostream. |
Definition at line 81 of file report_stream.hpp.