11#ifndef EASY3D_UTIL_PROGRESS_H
12#define EASY3D_UTIL_PROGRESS_H
39 virtual void notify(std::size_t percent,
bool update_viewer) = 0;
60 ProgressLogger(std::size_t max_val,
bool update_viewer,
bool quiet =
false);
69 virtual void notify(std::size_t new_value);
92 void reset(std::size_t max_val);
95 virtual void update();
100 std::size_t cur_percent_;
virtual void cancel()
Cancel the progress.
Definition progress.cpp:78
ProgressClient()
Constructor.
Definition progress.cpp:74
virtual void notify(std::size_t percent, bool update_viewer)=0
Notify the progress.
virtual ~ProgressClient()=default
Destructor.
virtual void next()
Move to the next step.
Definition progress.cpp:112
virtual ~ProgressLogger()
Destructor.
Definition progress.cpp:99
virtual void done()
Mark the progress as done.
Definition progress.h:77
ProgressLogger(std::size_t max_val, bool update_viewer, bool quiet=false)
Constructor.
Definition progress.cpp:85
bool is_canceled() const
Check if the progress is canceled.
Definition progress.cpp:118
virtual void notify(std::size_t new_value)
Notify the progress.
Definition progress.cpp:106
void reset()
Resets the progress logger without changing the progress range.
Definition progress.h:87
Definition collider.cpp:182
void print_progress(float percentage)
A simple progress indicator for console applications.
Definition progress.cpp:140