Tag Parser: TagParser::BasicProgressFeedback< ActualProgressFeedback > Class Template Reference

Tag Parser 12.5.2 C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
TagParser::BasicProgressFeedback< ActualProgressFeedback > Class Template Reference

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).

## Detailed Description

template<typename ActualProgressFeedback>
class TagParser::BasicProgressFeedback< ActualProgressFeedback >

The BasicProgressFeedback class provides the base for ProgressFeedback and AbortableProgressFeedback.

Remarks
  Don't use this class directly. Use ProgressFeedback or AbortableProgressFeedback instead.

Definition at line 13 of file progressfeedback.h.

## Member Typedef Documentation

## ◆ Callback

template<typename ActualProgressFeedback>

using TagParser::BasicProgressFeedback< ActualProgressFeedback >::Callback = std::function<void(ActualProgressFeedback &feedback)>

Definition at line 15 of file progressfeedback.h.

## Constructor & Destructor Documentation

## ◆ BasicProgressFeedback() [1/2]

template<typename ActualProgressFeedback>

TagParser::BasicProgressFeedback< ActualProgressFeedback >::BasicProgressFeedback | ( | const Callback & | callback,
|  | const Callback & | percentageOnlyCallback = Callback() )
| 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.

## ◆ BasicProgressFeedback() [2/2]

template<typename ActualProgressFeedback>

TagParser::BasicProgressFeedback< ActualProgressFeedback >::BasicProgressFeedback | ( | Callback && | callback = Callback(),
|  | Callback && | percentageOnlyCallback = Callback() )
| 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.

## Member Function Documentation

## ◆ overallPercentage()

template<typename ActualProgressFeedback>

std::uint8_t TagParser::BasicProgressFeedback< ActualProgressFeedback >::overallPercentage | ( |  | ) | const
| inline

Returns the overall percentage (initially 0, supposed to be a value from 0 to 100).

Remarks
  A percentage of 0 means that the percentage is currently unknown; 100 means finished.

Definition at line 86 of file progressfeedback.h.

## ◆ step()

template<typename ActualProgressFeedback>

const std::string & TagParser::BasicProgressFeedback< ActualProgressFeedback >::step | ( |  | ) | const
| inline

Returns the name of the current step (initially empty).

Definition at line 68 of file progressfeedback.h.

## ◆ stepPercentage()

template<typename ActualProgressFeedback>

std::uint8_t TagParser::BasicProgressFeedback< ActualProgressFeedback >::stepPercentage | ( |  | ) | const
| inline

Returns the percentage of the current step (initially 0, supposed to be a value from 0 to 100).

Remarks
  A percentage of 0 means that the percentage is currently unknown; 100 means finished.

Definition at line 77 of file progressfeedback.h.

## ◆ updateOverallPercentage()

template<typename ActualProgressFeedback>

void TagParser::BasicProgressFeedback< ActualProgressFeedback >::updateOverallPercentage | ( | std::uint8_t | overallPercentage | ) |
| inline

Updates the overall percentage and invokes the second callback specified on construction (or the first if only one has been specified).

Remarks
  Supposed to be called only by the operation itself.

Definition at line 150 of file progressfeedback.h.

## ◆ updateStep() [1/2]

template<typename ActualProgressFeedback>

void TagParser::BasicProgressFeedback< ActualProgressFeedback >::updateStep | ( | const std::string & | step,
|  | std::uint8_t | stepPercentage = 0 )
| inline

Updates the current step and invokes the first callback specified on construction.

Remarks
  Supposed to be called only by the operation itself.

Definition at line 96 of file progressfeedback.h.

## ◆ updateStep() [2/2]

template<typename ActualProgressFeedback>

void TagParser::BasicProgressFeedback< ActualProgressFeedback >::updateStep | ( | std::string && | step,
|  | std::uint8_t | stepPercentage = 0 )
| inline

Updates the current step and invokes the first callback specified on construction.

Remarks
  Supposed to be called only by the operation itself.

Definition at line 110 of file progressfeedback.h.

## ◆ updateStepPercentage()

template<typename ActualProgressFeedback>

void TagParser::BasicProgressFeedback< ActualProgressFeedback >::updateStepPercentage | ( | std::uint8_t | stepPercentage | ) |
| inline

Updates the current step percentage and invokes the second callback specified on construction (or the first if only one has been specified).

Remarks
  Supposed to be called only by the operation itself.

Definition at line 124 of file progressfeedback.h.

## ◆ updateStepPercentageFromFraction()

template<typename ActualProgressFeedback>

void TagParser::BasicProgressFeedback< ActualProgressFeedback >::updateStepPercentageFromFraction | ( | double | stepPercentage | ) |
| inline

Updates the current step percentage and invokes the second callback specified on construction (or the first if only one has been specified).

Parameters

  stepPercentage | Specifies the percentage which is supposed to be a value from 0.0 to 1.0.

Remarks
  Supposed to be called only by the operation itself.

Definition at line 140 of file progressfeedback.h.

The documentation for this class was generated from the following file:

- progressfeedback.h