Progress Class Reference

Display progress string and compute. More...

#include <Progress.hh>

List of all members.

Public Member Functions

 Progress (long skip=0, long max_count=0)
 Create progress object.
void set_file (FILE *file)
 Set the FILE stream for printing the report.
void set_report_string (std::string str)
 Set the report string shown before numerical report.
void reset_timer ()
 Reset timer for estimating time left.
void step (long steps=1)
 Increase progress counter.
void show_report ()
 Show the progress report.
void finish ()
 Finish report by printing newline and stopping timer.

Private Attributes

FILE * m_file
 FILE stream for printing the report.
std::string m_report_str
 Prefix string for the report (empty if not used).
long m_count
 Current progress count.
long m_skip_count
 Decreasing counter for next report.
long m_skip
 Number of counts to skip between showing the report string (0 = report every time).
long m_max_count
 Counter value when the job should be finished.
Timer m_timer
 Timer used for estimating time left (used only if m_max_count is positive).


Detailed Description

Display progress string and compute.


Constructor & Destructor Documentation

Progress::Progress long  skip = 0,
long  max_count = 0
[inline]
 

Create progress object.

Parameters:
skip = number of counts to skip between each report
max_count = maximum count for estimating time left (zero if not used at all)


Member Function Documentation

void Progress::finish  )  [inline]
 

Finish report by printing newline and stopping timer.

void Progress::reset_timer  )  [inline]
 

Reset timer for estimating time left.

void Progress::set_file FILE *  file  )  [inline]
 

Set the FILE stream for printing the report.

void Progress::set_report_string std::string  str  )  [inline]
 

Set the report string shown before numerical report.

void Progress::show_report  )  [inline]
 

Show the progress report.

void Progress::step long  steps = 1  )  [inline]
 

Increase progress counter.

Parameters:
steps = steps to increment


Member Data Documentation

long Progress::m_count [private]
 

Current progress count.

FILE* Progress::m_file [private]
 

FILE stream for printing the report.

long Progress::m_max_count [private]
 

Counter value when the job should be finished.

Zero if not used.

std::string Progress::m_report_str [private]
 

Prefix string for the report (empty if not used).

long Progress::m_skip [private]
 

Number of counts to skip between showing the report string (0 = report every time).

long Progress::m_skip_count [private]
 

Decreasing counter for next report.

Timer Progress::m_timer [private]
 

Timer used for estimating time left (used only if m_max_count is positive).


The documentation for this class was generated from the following file:
Generated on Mon Jan 8 15:51:04 2007 for bit by  doxygen 1.4.6