RUSH
Reusable Utilities in Single Headers is a collection of header-only utilities for C++
Loading...
Searching...
No Matches
rush::progress::Bar Class Reference

Public Member Functions

 Bar (const double max, Configuration cfg=Configuration())
 Construct a new Bar object.
 
double operator() (const double x)
 Update the progress bar with a specific value.
 
double operator++ ()
 Increment the progress bar by 1.
 
double operator++ (int)
 Increment the progress bar by 1 (postfix).
 
double operator+= (const int n)
 Increment the progress bar by a specified value.
 
double operator-- ()
 Decrement the progress bar by 1.
 
double operator-- (int)
 Decrement the progress bar by 1 (postfix).
 
double operator-= (const int n)
 Decrement the progress bar by a specified value.
 

Constructor & Destructor Documentation

◆ Bar()

rush::progress::Bar::Bar ( const double max,
Configuration cfg = Configuration() )
inlineexplicit

Construct a new Bar object.

Parameters
maxMaximum value representing 100% progress.
cfgConfiguration for the progress bar appearance.

Member Function Documentation

◆ operator()()

double rush::progress::Bar::operator() ( const double x)
inline

Update the progress bar with a specific value.

Parameters
xNew current value.
Returns
Updated progress ratio.

◆ operator++() [1/2]

double rush::progress::Bar::operator++ ( )
inline

Increment the progress bar by 1.

Returns
Updated progress ratio.

◆ operator++() [2/2]

double rush::progress::Bar::operator++ ( int )
inline

Increment the progress bar by 1 (postfix).

Returns
Updated progress ratio.

◆ operator+=()

double rush::progress::Bar::operator+= ( const int n)
inline

Increment the progress bar by a specified value.

Parameters
nValue to increment by.
Returns
Updated progress ratio.

◆ operator--() [1/2]

double rush::progress::Bar::operator-- ( )
inline

Decrement the progress bar by 1.

Returns
Updated progress ratio.

◆ operator--() [2/2]

double rush::progress::Bar::operator-- ( int )
inline

Decrement the progress bar by 1 (postfix).

Returns
Updated progress ratio.

◆ operator-=()

double rush::progress::Bar::operator-= ( const int n)
inline

Decrement the progress bar by a specified value.

Parameters
nValue to decrement by.
Returns
Updated progress ratio.

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