TRIQS/triqs_modest 3.3.0
Brillouin zone summation
|
#include <triqs/utility/streams.hpp>
FIXME : MERGE : replace triqs::report_steam, -> merge + alias.
A stream wrapper that conditionally forwards output to an underlying std::ostream based on a verbosity level.
The stream_with_verbosity class allows selective printing to an output stream depending on a user-defined verbosity threshold.
Usage:
Definition at line 28 of file streams.hpp.
Public Member Functions | |
ostream_with_verbosity (std::ostream &out, int verbosity=1) | |
Construct a stream_with_verbosity. | |
ostream_with_verbosity | operator() (int n) const |
Create a derived stream with adjusted verbosity. | |
ostream_with_verbosity & | operator<< (std::ostream &(*manip)(std::ostream &)) |
Stream insertion for manipulators like std::endl. | |
template<typename T > | |
ostream_with_verbosity & | operator<< (T const &value) |
Stream insertion operator for generic types. | |
|
inline |
Construct a stream_with_verbosity.
out | Reference to the output stream (e.g., std::cout). |
verbosity | Initial verbosity level (default is 1). |
Definition at line 39 of file streams.hpp.
|
inline |
Create a derived stream with adjusted verbosity.
n | The minimum verbosity required for output. |
Definition at line 46 of file streams.hpp.
|
inline |
Stream insertion for manipulators like std::endl.
manip | The manipulator function (e.g., std::endl). |
Definition at line 64 of file streams.hpp.
|
inline |
Stream insertion operator for generic types.
T | Any type supporting operator<< with std::ostream. |
value | The value to write to the stream. |
Definition at line 54 of file streams.hpp.