GammaCombo  Rev:Unversioneddirectory
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ProgressBar Class Reference

Class showing a progress bar. More...

#include <ProgressBar.h>

Collaboration diagram for ProgressBar:
Collaboration graph
[legend]

Public Member Functions

void progress ()
 Call this from inside the loop. More...
 
 ProgressBar (OptParser *arg, unsigned int n)
 
void skipSteps (unsigned int n)
 Increase the internal count by n steps. More...
 
 ~ProgressBar ()
 

Private Member Functions

void progressBar ()
 Display the progress as a bar: 100% [==================================================]. More...
 
void progressPercentage ()
 Display the progress as percentage without flushing, so that the logfiles of batch jobs look good. More...
 

Private Attributes

OptParser_arg
 command line arguments More...
 
bool _batch
 display progress in a log-file compatible way More...
 
unsigned int _n
 maximum number of steps, "100%" More...
 
int _resolution
 update the display this many times More...
 
int _width
 width of the progress bar More...
 
unsigned int _x
 current step, "78%" More...
 

Detailed Description

Class showing a progress bar.

Definition at line 20 of file ProgressBar.h.

Constructor & Destructor Documentation

§ ProgressBar()

ProgressBar::ProgressBar ( OptParser arg,
unsigned int  n 
)

Definition at line 3 of file ProgressBar.cpp.

§ ~ProgressBar()

ProgressBar::~ProgressBar ( )

Definition at line 14 of file ProgressBar.cpp.

Member Function Documentation

§ progress()

void ProgressBar::progress ( )

Call this from inside the loop.

Definition at line 20 of file ProgressBar.cpp.

§ progressBar()

void ProgressBar::progressBar ( )
private

Display the progress as a bar: 100% [==================================================].

Definition at line 32 of file ProgressBar.cpp.

§ progressPercentage()

void ProgressBar::progressPercentage ( )
private

Display the progress as percentage without flushing, so that the logfiles of batch jobs look good.

Definition at line 58 of file ProgressBar.cpp.

§ skipSteps()

void ProgressBar::skipSteps ( unsigned int  n)

Increase the internal count by n steps.

Definition at line 67 of file ProgressBar.cpp.

Member Data Documentation

§ _arg

OptParser* ProgressBar::_arg
private

command line arguments

Definition at line 35 of file ProgressBar.h.

§ _batch

bool ProgressBar::_batch
private

display progress in a log-file compatible way

Definition at line 40 of file ProgressBar.h.

§ _n

unsigned int ProgressBar::_n
private

maximum number of steps, "100%"

Definition at line 36 of file ProgressBar.h.

§ _resolution

int ProgressBar::_resolution
private

update the display this many times

Definition at line 39 of file ProgressBar.h.

§ _width

int ProgressBar::_width
private

width of the progress bar

Definition at line 38 of file ProgressBar.h.

§ _x

unsigned int ProgressBar::_x
private

current step, "78%"

Definition at line 37 of file ProgressBar.h.


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