A simple progress bar.
More...
#include <ProgressBar.h>
|
| ProgressBar (const unsigned long long max, std::ostream &out=std::cout, int barwidth=70) |
|
void | step () |
| increase progress by 1 step (not percent!) More...
|
|
void | stepto (long long newpos) |
|
void | operator++ () |
|
void | undraw () |
| remove all traces of the bar from the output stream More...
|
|
|
void | draw () |
| Draw the progress bar to the output stream. More...
|
|
A simple progress bar.
Definition at line 10 of file ProgressBar.h.
ProgressBar::ProgressBar |
( |
const unsigned long long |
max, |
|
|
std::ostream & |
out = std::cout , |
|
|
int |
barwidth = 70 |
|
) |
| |
|
inline |
Create a new progress bar
- Parameters
-
max | the value that constitutes 100% |
out | the output stream to draw the progress bar on |
barwidth | the width of the bar in characters |
Definition at line 16 of file ProgressBar.h.
void ProgressBar::draw |
( |
| ) |
|
|
inlineprotected |
Draw the progress bar to the output stream.
Definition at line 56 of file ProgressBar.h.
void ProgressBar::operator++ |
( |
| ) |
|
|
inline |
void ProgressBar::step |
( |
| ) |
|
|
inline |
increase progress by 1 step (not percent!)
Definition at line 26 of file ProgressBar.h.
void ProgressBar::stepto |
( |
long long |
newpos | ) |
|
|
inline |
set progress to a position
- Parameters
-
newpos | position to set the progress to (steps, not percent!) |
Definition at line 33 of file ProgressBar.h.
void ProgressBar::undraw |
( |
| ) |
|
|
inline |
remove all traces of the bar from the output stream
Definition at line 43 of file ProgressBar.h.
The documentation for this class was generated from the following file: