aimstil  5.0.5
til::ProgressIndicator< TPICallback > Class Template Reference

A simple base class used to give progression feedback. More...

#include <cathier/progress_indicator.h>

Public Member Functions

 ProgressIndicator (std::size_t parts, std::size_t total)
 Give the total number of iterations, and the number of parts you want to divide this total by. More...
 
void init ()
 
std::size_t & total ()
 
std::size_t & parts ()
 
TPICallback & callback ()
 
void operator() (std::size_t i)
 Call the callback if the iteration number i has reached the next part. More...
 

Detailed Description

template<typename TPICallback>
class til::ProgressIndicator< TPICallback >

A simple base class used to give progression feedback.

You give the number of iterations, and the number of parts you want to split these iterations in. Then, your callback is called when a sufficient number of iterations have been done.

Definition at line 125 of file progress_indicator.h.

Constructor & Destructor Documentation

◆ ProgressIndicator()

template<typename TPICallback >
til::ProgressIndicator< TPICallback >::ProgressIndicator ( std::size_t  parts,
std::size_t  total 
)

Give the total number of iterations, and the number of parts you want to divide this total by.

Member Function Documentation

◆ callback()

template<typename TPICallback >
TPICallback& til::ProgressIndicator< TPICallback >::callback ( )
inline

Definition at line 140 of file progress_indicator.h.

References til::callback::PI_Print::operator()().

◆ init()

template<typename TPICallback >
void til::ProgressIndicator< TPICallback >::init ( )

◆ operator()()

template<typename TPICallback >
void til::ProgressIndicator< TPICallback >::operator() ( std::size_t  i)

Call the callback if the iteration number i has reached the next part.

◆ parts()

template<typename TPICallback >
std::size_t& til::ProgressIndicator< TPICallback >::parts ( )
inline

Definition at line 139 of file progress_indicator.h.

◆ total()

template<typename TPICallback >
std::size_t& til::ProgressIndicator< TPICallback >::total ( )
inline

Definition at line 138 of file progress_indicator.h.


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