Tree Compression with Top Trees Revisited
Public Member Functions | Protected Member Functions | List of all members
ProgressBar Class Reference

A simple progress bar. More...

#include <ProgressBar.h>

Public Member Functions

 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...
 

Protected Member Functions

void draw ()
 Draw the progress bar to the output stream. More...
 

Detailed Description

A simple progress bar.

Definition at line 10 of file ProgressBar.h.

Constructor & Destructor Documentation

ProgressBar::ProgressBar ( const unsigned long long  max,
std::ostream &  out = std::cout,
int  barwidth = 70 
)
inline

Create a new progress bar

Parameters
maxthe value that constitutes 100%
outthe output stream to draw the progress bar on
barwidththe width of the bar in characters

Definition at line 16 of file ProgressBar.h.

Member Function Documentation

void ProgressBar::draw ( )
inlineprotected

Draw the progress bar to the output stream.

Definition at line 56 of file ProgressBar.h.

void ProgressBar::operator++ ( )
inline

Definition at line 38 of file ProgressBar.h.

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
newposposition 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: