General-purpose progress reporter. More...
#include <mitsuba/core/statistics.h>
Public Member Functions | |
ProgressReporter (const std::string &title, long long total, const void *ptr) | |
void | reset () |
Reset the progress reporter to its initial state. More... | |
void | update (long long value) |
Update the progress display. More... | |
long long | getValue () const |
Return the current value. More... | |
void | finish () |
Finish. More... | |
Static Public Member Functions | |
static void | setEnabled (bool enabled) |
Enable/disable progress bars. More... | |
static bool | isEnabled () |
Check whether progress bars are enabled. More... | |
General-purpose progress reporter.
This class is used to track the progress of various operations that might take longer than, say, a second. It provides interactive feedback on both the console binaries and within Mitsuba's Qt-based GUI.
mitsuba::ProgressReporter::ProgressReporter | ( | const std::string & | title, |
long long | total, | ||
const void * | ptr | ||
) |
Construct a new progress reporter. 'ptr' is a custom pointer payload to be submitted with progress messages
|
inline |
Finish.
|
inline |
Return the current value.
|
inlinestatic |
Check whether progress bars are enabled.
void mitsuba::ProgressReporter::reset | ( | ) |
Reset the progress reporter to its initial state.
|
static |
Enable/disable progress bars.
void mitsuba::ProgressReporter::update | ( | long long | value | ) |
Update the progress display.