![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
Parallel-aware output stream. More...
#include <pcout.hpp>
Public Member Functions | |
| pcout_t (std::ostream &os=std::cout) | |
| Construct a pcout object. | |
| pcout_t & | level (LogLevel lvl) |
| Set the log level for the next << only. | |
| template<typename T> | |
| pcout_t & | operator<< (const T &value) |
| Generic stream output operator. | |
| pcout_t & | operator<< (std::ostream &(*pf)(std::ostream &)) |
| Stream manipulators (e.g. std::endl, std::fixed). | |
| pcout_t & | operator<< (std::ios &(*pf)(std::ios &)) |
| pcout_t & | operator<< (std::ios_base &(*pf)(std::ios_base &)) |
| void | flush () |
| Explicitly flush the underlying stream. | |
Private Member Functions | |
| bool | shouldPrint () const |
| Check whether the current message should be printed. | |
| void | resetMessageLevel () |
| Reset the message log level to INFO. | |
Static Private Member Functions | |
| static constexpr LogLevel | defaultLogLevel () |
| Default log level depending on build type. | |
Private Attributes | |
| std::ostream * | os_ |
| LogLevel | current_level_ |
| LogLevel | msg_level_ |
Parallel-aware output stream.
pcout behaves like std::cout, but:
|
inlineexplicit |
Construct a pcout object.
| os | Output stream to wrap (std::cout by default). |
|
inlinestaticconstexprprivate |
Default log level depending on build type.
DEBUG builds enable DEBUG logging, Release builds default to INFO.
|
inline |
Explicitly flush the underlying stream.
Set the log level for the next << only.
Every << resets the level to INFO, so a message at another level must be passed in a single <<.
|
inline |
Generic stream output operator.
|
inline |
|
inline |
|
inline |
Stream manipulators (e.g. std::endl, std::fixed).
|
inlineprivate |
Reset the message log level to INFO.
Ensures that pcout << ... uses INFO by default.
|
inlineprivate |
Check whether the current message should be printed.
|
private |
|
private |
|
private |