openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Public Member Functions | List of all members
progress_bar< T > Class Template Reference

Display progress as a bar. More...

#include <progress.hpp>

Inheritance diagram for progress_bar< T >:
Collaboration diagram for progress_bar< T >:

Public Member Functions

 progress_bar (T num_next, const char *msg, T bar_start=60, T bar_len=20, char bar_char='=')
 Constructor. More...
 
void next ()
 increment progress counter by one More...
 
void increment (T inc)
 increment progress counter by a custom value More...
 
void finish ()
 finish up progress display More...
 
- Public Member Functions inherited from progress< T >
 progress (T num_next, const char *msg)
 
virtual ~progress ()
 

Additional Inherited Members

- Protected Attributes inherited from progress< T >
_num_next
 number of times next will be triggered More...
 
std::string _msg
 message that will be displayed before progress information. More...
 

Detailed Description

template<class T>
class progress_bar< T >

Display progress as a bar.

Template Parameters
TInteger type

Definition at line 140 of file progress.hpp.

Constructor & Destructor Documentation

◆ progress_bar()

template<class T >
progress_bar< T >::progress_bar ( num_next,
const char *  msg,
bar_start = 60,
bar_len = 20,
char  bar_char = '=' 
)
inline

Constructor.

Parameters
num_nextEstimate of how many times next() will be issued.
msgMessage to display together with progress bar.
bar_startNumber of characters after which the bar should start.
bar_lenNumber of characters making up the bar.
bar_charCharacter used to represent the bar.

Definition at line 195 of file progress.hpp.

Member Function Documentation

◆ finish()

template<class T >
void progress_bar< T >::finish ( )
inlinevirtual

finish up progress display

Implements progress< T >.

Definition at line 224 of file progress.hpp.

◆ increment()

template<class T >
void progress_bar< T >::increment ( inc)
inlinevirtual

increment progress counter by a custom value

Implements progress< T >.

Definition at line 217 of file progress.hpp.

◆ next()

template<class T >
void progress_bar< T >::next ( )
inlinevirtual

increment progress counter by one

Implements progress< T >.

Definition at line 210 of file progress.hpp.


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