Tag Parser 12.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The BasicProgressFeedback class provides the base for ProgressFeedback and AbortableProgressFeedback. More...
#include <progressfeedback.h>
Public Types | |
using | Callback = std::function<void(ActualProgressFeedback &feedback)> |
Public Member Functions | |
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). | |
The BasicProgressFeedback class provides the base for ProgressFeedback and AbortableProgressFeedback.
Definition at line 13 of file progressfeedback.h.
using TagParser::BasicProgressFeedback< ActualProgressFeedback >::Callback = std::function<void(ActualProgressFeedback &feedback)> |
Definition at line 15 of file progressfeedback.h.
|
inlineexplicit |
Constructs a new BasicProgressFeedback.
It will call callback on the next step and percentageOnlyCallback when only the percentage changes.
Definition at line 43 of file progressfeedback.h.
|
inlineexplicit |
Constructs a new BasicProgressFeedback.
It will call callback on the next step and percentageOnlyCallback when only the percentage changes.
Definition at line 57 of file progressfeedback.h.
|
inline |
Returns the overall percentage (initially 0, supposed to be a value from 0 to 100).
Definition at line 86 of file progressfeedback.h.
|
inline |
Returns the name of the current step (initially empty).
Definition at line 68 of file progressfeedback.h.
|
inline |
Returns the percentage of the current step (initially 0, supposed to be a value from 0 to 100).
Definition at line 77 of file progressfeedback.h.
|
inline |
Updates the overall percentage and invokes the second callback specified on construction (or the first if only one has been specified).
Definition at line 150 of file progressfeedback.h.
|
inline |
Updates the current step and invokes the first callback specified on construction.
Definition at line 96 of file progressfeedback.h.
|
inline |
Updates the current step and invokes the first callback specified on construction.
Definition at line 110 of file progressfeedback.h.
|
inline |
Updates the current step percentage and invokes the second callback specified on construction (or the first if only one has been specified).
Definition at line 124 of file progressfeedback.h.
|
inline |
Updates the current step percentage and invokes the second callback specified on construction (or the first if only one has been specified).
stepPercentage | Specifies the percentage which is supposed to be a value from 0.0 to 1.0. |
Definition at line 140 of file progressfeedback.h.