LBIBCell
 All Classes Functions Variables Friends Pages
UtilLib::ProgressBar Class Reference

a class for reporting the current simulation status. Usage: construct an object of this class with the expected count Use the increment operator on this object on each increased count Then the current progress is printed to the output More...

#include <ProgressBar.hpp>

Public Member Functions

 ProgressBar (unsigned int expected_count, double updateInterval=30, std::ostream &os=std::cout)
 
unsigned int operator+= (unsigned int increment)
 
unsigned int operator++ ()
 Prefix operator. More...
 
unsigned int operator++ (int i)
 Postfix operator. More...
 

Detailed Description

a class for reporting the current simulation status. Usage: construct an object of this class with the expected count Use the increment operator on this object on each increased count Then the current progress is printed to the output

Definition at line 36 of file ProgressBar.hpp.

Constructor & Destructor Documentation

UtilLib::ProgressBar::ProgressBar ( unsigned int  expected_count,
double  updateInterval = 30,
std::ostream &  os = std::cout 
)
explicit

Constructor

Parameters
expected_countThe expected count
updateIntervalhow often the information should be updated default this is 30 seconds
osThe output stream

Definition at line 27 of file ProgressBar.cpp.

Member Function Documentation

unsigned int UtilLib::ProgressBar::operator++ ( )

Prefix operator.

Returns
the increased integer

Definition at line 58 of file ProgressBar.cpp.

unsigned int UtilLib::ProgressBar::operator++ ( int  i)

Postfix operator.

Parameters
ithe increased integer
Returns
the increased integer

Definition at line 62 of file ProgressBar.cpp.

unsigned int UtilLib::ProgressBar::operator+= ( unsigned int  increment)

Display appropriate progress tic if needed.

Parameters
increment
Postcondition
count()== original count() + increment
Returns
The increased integer

Definition at line 47 of file ProgressBar.cpp.


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