Tag Parser
9.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. 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, std::uint8_t stepPercentage=0) |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set. More... | |
void | nextStepOrStop (std::string &&step, std::uint8_t stepPercentage=0) |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set. More... | |
![]() | |
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... | |
std::uint8_t | stepPercentage () const |
Returns the percentage of the current step (initially 0, supposed to be a value from 0 to 100). More... | |
std::uint8_t | overallPercentage () const |
Returns the overall percentage (initially 0, supposed to be a value from 0 to 100). More... | |
void | updateStep (const std::string &step, std::uint8_t stepPercentage=0) |
Updates the current step and invokes the first callback specified on construction. More... | |
void | updateStep (std::string &&step, std::uint8_t stepPercentage=0) |
Updates the current step and invokes the first callback specified on construction. More... | |
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). 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 (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). More... | |
Additional Inherited Members | |
![]() | |
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 186 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 206 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 217 of file progressfeedback.h.
|
inline |
Returns whether the operation has been aborted via tryToAbort().
Definition at line 226 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set.
Definition at line 256 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted; otherwise the data for the next step is set.
Definition at line 268 of file progressfeedback.h.
|
inline |
Throws an OperationAbortedException if aborted.
Definition at line 245 of file progressfeedback.h.
|
inline |
Aborts the operation.
Definition at line 236 of file progressfeedback.h.