HLIBpro  2.4
Public Member Functions | List of all members
TConsoleProgressBar Class Reference

class for a progress bar printing progress on standard console (or via IO streams) More...

#include <TProgressBar.hh>

Inheritance diagram for TConsoleProgressBar:
TProgressBar

Public Member Functions

 TConsoleProgressBar (const progress_charset_t acharset=ascii_charset)
 
 TConsoleProgressBar (const std::string &format, const progress_charset_t acharset=ascii_charset)
 
 TConsoleProgressBar (std::ostream &out_stream, const progress_charset_t acharset=ascii_charset)
 
 TConsoleProgressBar (std::ostream &out_stream, const std::string &format, const progress_charset_t acharset=ascii_charset)
 
virtual ~TConsoleProgressBar ()
 dtor
 
virtual void init (const double min, const double max, const double curr)
 
virtual void finish ()
 finish progress bar
 
- Public Member Functions inherited from TProgressBar
virtual bool is_initialised () const
 return true if progress meter is initialised
 
virtual void cancel ()
 signal cancelation request
 
virtual bool do_cancel () const
 request cancelation
 
virtual double min () const
 return progress interval (minimum value)
 
virtual double max () const
 return progress interval (maximum value)
 
virtual double val () const
 return current value in progress interval
 
virtual double percentage () const
 return percentage of progress in interval [0,1]
 
virtual void reset (const double min, const double max, const double curr)
 reset status, e.g. set new values without intialisation
 
virtual void advance (const double f)
 advance progress by f
 

Detailed Description

Constructor & Destructor Documentation

TConsoleProgressBar ( const progress_charset_t  acharset = ascii_charset)

construct progress bar using std::cout output stream and standard output format

TConsoleProgressBar ( const std::string &  format,
const progress_charset_t  acharset = ascii_charset 
)

construct progress bar using std::cout output stream and output format as defined by format

TConsoleProgressBar ( std::ostream &  out_stream,
const progress_charset_t  acharset = ascii_charset 
)

construct progress bar with output stream out_stream and standard output format

TConsoleProgressBar ( std::ostream &  out_stream,
const std::string &  format,
const progress_charset_t  acharset = ascii_charset 
)

construct progress bar with output stream out_stream and output format as defined by format

Member Function Documentation

virtual void init ( const double  min,
const double  max,
const double  curr 
)
virtual

initialise status of progress bar, e.g. [min, max] with current value curr

Reimplemented from TProgressBar.