Libosmium
2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <verbose_output.hpp>
Public Member Functions | |
VerboseOutput (bool verbose=false) noexcept | |
std::time_t | runtime () const noexcept |
bool | verbose () const noexcept |
Get "verbose" setting. More... | |
void | verbose (bool verbose) noexcept |
Set "verbose" setting. More... | |
template<typename T > | |
void | print (const T &value) |
Private Member Functions | |
void | start_line () |
Private Attributes | |
std::time_t | m_start |
all time output will be relative to this start time More... | |
bool | m_verbose |
is verbose mode enabled? More... | |
bool | m_newline = true |
a newline was written, start next output with runtime More... | |
Osmium programs often run for a long time because of the amount of OSM data processed. This class helps with keeping the user up to date by offering an easy way for programs to optionally output verbose information about what's going on.
Use an object of this class instead of std::cerr as an output stream. Nothing is actually written if the object is not set to verbose mode. If it is set to verbose mode, each line is prepended with the running time, ie the time since the VerboseOutput object was created.
|
inlineexplicitnoexcept |
|
inline |
|
inlinenoexcept |
|
inlineprivate |
If we remember that a newline was written as the last thing write out the time elapsed and reset the newline flag.
|
inlinenoexcept |
Get "verbose" setting.
|
inlinenoexcept |
Set "verbose" setting.
|
private |
a newline was written, start next output with runtime
|
private |
all time output will be relative to this start time
|
private |
is verbose mode enabled?