HLIBpro  2.1
Public Member Functions | List of all members
TStreamProgressBar Class Reference

class for a progress bar using IO stream to print the progress More...

#include <TProgressBar.hh>

Inheritance diagram for TStreamProgressBar:
TProgressBar

Public Member Functions

 TStreamProgressBar (const progress_charset_t acharset=ascii_charset)
 
 TStreamProgressBar (const std::string &format, const progress_charset_t acharset=ascii_charset)
 
 TStreamProgressBar (std::ostream &out_stream, const progress_charset_t acharset=ascii_charset)
 
 TStreamProgressBar (std::ostream &out_stream, const std::string &format, const progress_charset_t acharset=ascii_charset)
 
virtual ~TStreamProgressBar ()
 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

TStreamProgressBar ( const progress_charset_t  acharset = ascii_charset)

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

TStreamProgressBar ( 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

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

construct progress bar with output stream out_stream and standard output format

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