HLIBpro  2.3.1
Public Types | Public Member Functions | List of all members
TCBProgressBar Class Reference

class for progress bar calling user defined call back function upon change in status

#include <TProgressBar.hh>

Inheritance diagram for TCBProgressBar:
TProgressBar

Public Types

enum  
 
using func_t = void(*)(const double *values, int *cancel, void *arg)
 

Public Member Functions

 TCBProgressBar (const func_t cb, void *cb_arg=NULL)
 
- 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 init (const double min, const double max, const double curr)
 
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
 
virtual void finish ()
 finish progress bar
 

Member Typedef Documentation

using func_t = void (*) ( const double * values, int * cancel, void * arg )

callback function type values is an array with values as defined by enum below cancel indicates cancelation request by user arg user arguments to call back function

Member Enumeration Documentation

anonymous enum

fields in "values" array of progress bar callback function

Constructor & Destructor Documentation

TCBProgressBar ( const func_t  cb,
void *  cb_arg = NULL 
)
inline

construct progress bar with cb as call back function and cb_arg as optional arguments provided by each call to cb