osmanip
Library with useful output stream tools like: color and style manipulators, progress bars and terminal graphics.
Public Member Functions | Static Public Member Functions | List of all members
osm::make_MultiProgressBar< Indicators > Class Template Reference

Template class used to create multi progress bars. More...

#include <multi_progress_bar.hpp>

Public Member Functions

template<class... Inds>
 make_MultiProgressBar (Inds &&...bars)
 Construct a new make MultiProgressBar object. More...
 
template<class Func , class... Args>
void for_one (size_t idx, Func &&func, Args &&...args)
 Method used to update the progress bar for one progress bar only. More...
 
template<class Func , class... Args>
void for_each (Func &&func, Args &&...args)
 Method used to update progress bars simultaneously. More...
 

Static Public Member Functions

static size_t size ()
 Return the number of the indicators. More...
 

Detailed Description

template<class... Indicators>
class osm::make_MultiProgressBar< Indicators >

Template class used to create multi progress bars.

Template Parameters
IndicatorsThe parameter pack of the various progress bar types.

Constructor & Destructor Documentation

◆ make_MultiProgressBar()

template<class... Indicators>
template<class... Inds>
osm::make_MultiProgressBar< Indicators >::make_MultiProgressBar ( Inds &&...  bars)
inline

Construct a new make MultiProgressBar object.

Template Parameters
IndsThe parameter pack of the various progress bar types indicators.
Parameters
barsThe progress bars.

Member Function Documentation

◆ for_each()

template<class... Indicators>
template<class Func , class... Args>
void osm::make_MultiProgressBar< Indicators >::for_each ( Func &&  func,
Args &&...  args 
)
inline

Method used to update progress bars simultaneously.

Template Parameters
FuncThe type of the callable object (e.g., a function, lambda, or functor).
ArgsThe types of the additional arguments that will be passed to the callable.
Parameters
idxThe index of the progress bar to update.
funcThe callable object used to update the progress bar.
argsAdditional arguments to be passed to the callable.

◆ for_one()

template<class... Indicators>
template<class Func , class... Args>
void osm::make_MultiProgressBar< Indicators >::for_one ( size_t  idx,
Func &&  func,
Args &&...  args 
)
inline

Method used to update the progress bar for one progress bar only.

Template Parameters
FuncThe type of the callable object (e.g., a function, lambda, or functor).
ArgsThe types of the additional arguments that will be passed to the callable.
Parameters
idxThe index of the progress bar to update.
funcThe callable object used to update the progress bar.
argsAdditional arguments to be passed to the callable.

◆ size()

template<class... Indicators>
static size_t osm::make_MultiProgressBar< Indicators >::size ( )
inlinestatic

Return the number of the indicators.

Returns
size_t The number of the indicators.

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