ardour
|
#include <progress.h>
Classes | |
struct | Level |
Public Member Functions | |
Progress () | |
virtual | ~Progress () |
void | set_progress (float) |
void | ascend () |
void | descend (float) |
bool | cancelled () const |
Protected Member Functions | |
void | cancel () |
Private Member Functions | |
virtual void | set_overall_progress (float p)=0 |
Private Attributes | |
std::list< Level > | _stack |
bool | _cancelled |
A class to handle reporting of progress of something
Definition at line 30 of file progress.h.
ARDOUR::Progress::Progress | ( | ) |
Definition at line 26 of file progress.cc.
|
inlinevirtual |
Definition at line 34 of file progress.h.
void ARDOUR::Progress::ascend | ( | ) |
Definition at line 47 of file progress.cc.
|
protected |
Definition at line 76 of file progress.cc.
bool ARDOUR::Progress::cancelled | ( | ) | const |
Definition at line 82 of file progress.cc.
void ARDOUR::Progress::descend | ( | float | a | ) |
Descend down one level in terms of progress reporting; e.g. if there is a task which is split up into N subtasks, each of which report their progress from 0 to 100%, call descend() before executing each subtask, and ascend() afterwards to ensure that overall progress is reported correctly.
p | Percentage (from 0 to 1) of the current task to allocate to the subtask. |
Definition at line 41 of file progress.cc.
|
privatepure virtual |
Report overall progress.
p | Current progress (from 0 to 1) |
Implemented in ProgressReporter.
void ARDOUR::Progress::set_progress | ( | float | p | ) |
Set the progress of the current task.
p | Progress (from 0 to 1) |
Definition at line 59 of file progress.cc.
|
private |
Definition at line 59 of file progress.h.
|
private |
Definition at line 58 of file progress.h.