#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.
|
| | 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.
|
◆ report_stream() [1/2]
| triqs::utility::report_stream::report_stream |
( |
std::ostream * | out_, |
|
|
int | verbosity_ = 1 ) |
|
inline |
Construct a report stream from a pointer to an ostream and a verbosity level.
- Parameters
-
| out_ | Pointer to the underlying std::ostream. |
| verbosity_ | Verbosity level. |
Definition at line 56 of file report_stream.hpp.
◆ report_stream() [2/2]
| triqs::utility::report_stream::report_stream |
( |
std::ostream & | out_, |
|
|
int | verbosity_ = 1 ) |
|
inline |
Construct a report stream from a reference to an ostream and a verbosity level.
- Parameters
-
| out_ | Reference to the underlying std::ostream. |
| verbosity_ | Verbosity level. |
Definition at line 64 of file report_stream.hpp.
◆ operator()()
| report_stream triqs::utility::report_stream::operator() |
( |
int | n | ) |
const |
|
inline |
Return a child report stream whose verbosity has been reduced by \( n - 1 \).
- Parameters
-
| n | Amount by which to lower the verbosity threshold. |
- Returns
- A report stream writing to the same ostream with the reduced verbosity.
Definition at line 72 of file report_stream.hpp.
◆ operator<<() [1/2]
| report_stream & triqs::utility::report_stream::operator<< |
( |
std::ostream &(* | manip )(std::ostream &) | ) |
|
|
inline |
Streaming operator that accepts manipulators like std::endl.
- Parameters
-
| manip | Stream manipulator applied to the underlying ostream when verbosity is greater than zero. |
- Returns
- Reference to *this to allow chaining.
Definition at line 92 of file report_stream.hpp.
◆ operator<<() [2/2]
template<class T>
| report_stream & triqs::utility::report_stream::operator<< |
( |
T const & | x | ) |
|
|
inline |
Streaming operator to write the given argument if the current verbosity is greater than zero.
- Template Parameters
-
- Parameters
-
| x | Object to write to the underlying ostream. |
- Returns
- Reference to *this to allow chaining.
Definition at line 81 of file report_stream.hpp.
The documentation for this class was generated from the following file: