#include <ProgressOutput.h>
Public Member Functions | |
ProgressOutput (void) | |
ProgressOutput (const std::string &m) | |
void | setMessage (const std::string &m) |
void | setMessage (const char *msgfmt,...) |
void | update (float rate) |
void | done (void) const |
void | done (float rate, float avgweight=1.0) const |
Static Public Attributes | |
static const float | NoAvgWeight = 1.0 |
Protected Member Functions | |
std::string | vcompose (const char *msgfmt, va_list ap) const |
Private Attributes | |
std::string | Message |
time_t | LastUpdate |
ProgressOutput::ProgressOutput | ( | void | ) |
create an empty ProgressOutput object
ProgressOutput::ProgressOutput | ( | const std::string & | m | ) |
create a ProgressOutput object
m | the message to be displayed |
void ProgressOutput::setMessage | ( | const std::string & | m | ) | [inline] |
void ProgressOutput::setMessage | ( | const char * | msgfmt, | |
... | ||||
) |
void ProgressOutput::update | ( | float | rate | ) |
update the output (taking update frequency into account) with rate as percentage
void ProgressOutput::done | ( | void | ) | const |
update the output appending "done" and a newline (no rate nor average weight)
void ProgressOutput::done | ( | float | rate, | |
float | avgweight = 1.0 | |||
) | const |
update the output appending rate, [average edge weight], "done" and a newline
rate | the rate of matched vertices | |
avgweight | the average edge weight (is not printed if not given) |
std::string ProgressOutput::vcompose | ( | const char * | msgfmt, | |
va_list | ap | |||
) | const [protected] |
const float ProgressOutput::NoAvgWeight = 1.0 [static] |
std::string ProgressOutput::Message [private] |
time_t ProgressOutput::LastUpdate [private] |