Tag Parser 12.4.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. | |
AbortableProgressFeedback (Callback &&callback=Callback(), Callback &&percentageOnlyCallback=Callback()) | |
Constructs a new AbortableProgressFeedback. | |
AbortableProgressFeedback (const AbortableProgressFeedback &) | |
Constructs a new AbortableProgressFeedback based on other. | |
bool | isAborted () const |
Returns whether the operation has been aborted via tryToAbort(). | |
void | tryToAbort () |
Aborts the operation. | |
void | stopIfAborted () const |
Throws an OperationAbortedException if aborted. | |
void | nextStepOrStop (const std::string &step, std::uint8_t stepPercentage=0) |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set. | |
void | nextStepOrStop (std::string &&step, std::uint8_t stepPercentage=0) |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set. | |
Public Member Functions inherited from TagParser::BasicProgressFeedback< AbortableProgressFeedback > | |
BasicProgressFeedback (const Callback &callback, const Callback &percentageOnlyCallback=Callback()) | |
Constructs a new BasicProgressFeedback. | |
BasicProgressFeedback (Callback &&callback=Callback(), Callback &&percentageOnlyCallback=Callback()) | |
Constructs a new BasicProgressFeedback. | |
const std::string & | step () const |
Returns the name of the current step (initially empty). | |
std::uint8_t | stepPercentage () const |
Returns the percentage of the current step (initially 0, supposed to be a value from 0 to 100). | |
std::uint8_t | overallPercentage () const |
Returns the overall percentage (initially 0, supposed to be a value from 0 to 100). | |
void | updateStep (const std::string &step, std::uint8_t stepPercentage=0) |
Updates the current step and invokes the first callback specified on construction. | |
void | updateStep (std::string &&step, std::uint8_t stepPercentage=0) |
Updates the current step and invokes the first callback specified on construction. | |
void | updateStepPercentage (std::uint8_t stepPercentage) |
Updates the current step percentage and invokes the second callback specified on construction (or the first if only one has been specified). | |
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). | |
void | updateOverallPercentage (std::uint8_t overallPercentage) |
Updates the overall percentage and invokes the second callback specified on construction (or the first if only one has been specified). | |
Additional Inherited Members | |
Public Types inherited from TagParser::BasicProgressFeedback< AbortableProgressFeedback > | |
using | Callback |
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
It also allows to abort the operation.
Definition at line 186 of file progressfeedback.h.
|
inlineexplicit |
Constructs a new AbortableProgressFeedback.
It will call callback on the next step and percentageOnlyCallback when only the percentage changes.
Definition at line 207 of file progressfeedback.h.
|
inlineexplicit |
Constructs a new AbortableProgressFeedback.
It will call callback on the next step and percentageOnlyCallback when only the percentage changes.
Definition at line 218 of file progressfeedback.h.
|
inline |
Constructs a new AbortableProgressFeedback based on other.
Definition at line 227 of file progressfeedback.h.
|
inline |
Returns whether the operation has been aborted via tryToAbort().
Definition at line 236 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set.
Definition at line 266 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set.
Definition at line 278 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted.
Definition at line 255 of file progressfeedback.h.
|
inline |
Aborts the operation.
Definition at line 246 of file progressfeedback.h.