|
Tag Parser
8.3.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks. More...
#include <progressfeedback.h>
Public Member Functions | |
| AbortableProgressFeedback (const Callback &callback, const Callback &percentageOnlyCallback=Callback()) | |
| Constructs a new AbortableProgressFeedback. More... | |
| AbortableProgressFeedback (Callback &&callback, Callback &&percentageOnlyCallback=Callback()) | |
| Constructs a new AbortableProgressFeedback. More... | |
| bool | isAborted () const |
| Returns whether the operation has been aborted via tryToAbort(). More... | |
| void | tryToAbort () |
| Aborts the operation. More... | |
| void | stopIfAborted () const |
| Throws an OperationAbortedException if aborted. More... | |
| void | nextStepOrStop (const std::string &step, byte stepPercentage=0) |
| Throws an OperationAbortedException if aborted; otherwise the data for the next step is set. More... | |
| void | nextStepOrStop (std::string &&step, byte stepPercentage=0) |
| Throws an OperationAbortedException if aborted; otherwise the data for the next step is set. More... | |
Public Member Functions inherited from TagParser::BasicProgressFeedback< AbortableProgressFeedback > | |
| BasicProgressFeedback (const Callback &callback, const Callback &percentageOnlyCallback=Callback()) | |
| Constructs a new BasicProgressFeedback. More... | |
| BasicProgressFeedback (Callback &&callback, Callback &&percentageOnlyCallback=Callback()) | |
| Constructs a new BasicProgressFeedback. More... | |
| const std::string & | step () const |
| Returns the name of the current step (initially empty). More... | |
| byte | stepPercentage () const |
| Returns the percentage of the current step (initially 0, supposed to be a value from 0 to 100). More... | |
| byte | overallPercentage () const |
| Returns the overall percentage (initially 0, supposed to be a value from 0 to 100). More... | |
| void | updateStep (const std::string &step, byte stepPercentage=0) |
| Updates the current step and invokes the first callback specified on construction. More... | |
| void | updateStep (std::string &&step, byte stepPercentage=0) |
| Updates the current step and invokes the first callback specified on construction. More... | |
| void | updateStepPercentage (byte stepPercentage) |
| Updates the current step percentage and invokes the second callback specified on construction (or the first if only one has been specified). More... | |
| void | updateStepPercentageFromFraction (double stepPercentage) |
| Updates the current step percentage and invokes the second callback specified on construction (or the first if only one has been specified). More... | |
| void | updateOverallPercentage (byte overallPercentage) |
| Updates the overall percentage and invokes the second callback specified on construction (or the first if only one has been specified). More... | |
Additional Inherited Members | |
Public Types inherited from TagParser::BasicProgressFeedback< AbortableProgressFeedback > | |
| using | Callback = std::function< void(AbortableProgressFeedback &feedback)> |
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
It also allows to abort the operation.
Definition at line 185 of file progressfeedback.h.
|
inline |
Constructs a new AbortableProgressFeedback.
It will call callback on the next step and percentageOnlyCallback when only the percentage changes.
Definition at line 205 of file progressfeedback.h.
|
inline |
Constructs a new AbortableProgressFeedback.
It will call callback on the next step and percentageOnlyCallback when only the percentage changes.
Definition at line 216 of file progressfeedback.h.
|
inline |
Returns whether the operation has been aborted via tryToAbort().
Definition at line 225 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set.
Definition at line 255 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set.
Definition at line 267 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted.
Definition at line 244 of file progressfeedback.h.
|
inline |
Aborts the operation.
Definition at line 235 of file progressfeedback.h.
1.8.15