43 void SetTotal(int64_t total) { total_ = total; }
45 if (!update_progress_)
return true;
50 percent = count * 100.0 / total_;
55 return CallUpdate(percent);
62 bool CallUpdate(
double percent) {
63 if (update_progress_) {
64 return update_progress_(percent);
68 std::function<bool(double)> update_progress_;
70 int64_t last_count_ = -1;
78 : progress_bar_(100, progress_info, active) {}
80 while (last_pct_ < pct) {
void SetTotal(int64_t total)
Definition: ProgressReporters.h:43
void operator++()
Definition: ProgressReporters.h:59
void Finish()
Definition: ProgressReporters.h:57
bool Update(int64_t count)
Definition: ProgressReporters.h:44
CountingProgressReporter(std::function< bool(double)> f)
Definition: ProgressReporters.h:40
int count
Definition: FilePCD.cpp:61
update_progress(double percent) functor for ConsoleProgressBar
Definition: ProgressReporters.h:75
Definition: PinholeCameraIntrinsic.cpp:35
ConsoleProgressUpdater(const std::string &progress_info, bool active=false)
Definition: ProgressReporters.h:76
Definition: ProgressReporters.h:38
Definition: Console.h:211
bool operator()(double pct)
Definition: ProgressReporters.h:79