ProgressDelegate is the base class for progress and interrupt reporting.
More...
#include <ProgressDelegate.h>
ProgressDelegate class is used for reporting progress of and interrupting long-running operation such as PointWriter::write() and PointSource::read(). During long-running operation the delegate's updateCompleted() method is called which will inturn calls reportProgress() with the fraction completed. Likewise getCancelled() is called frequently and should return true when the delegate wants to stop the long-running operation.
Definition at line 29 of file ProgressDelegate.h.
virtual ProgressDelegate::~ProgressDelegate |
( |
void |
| ) |
|
|
virtual |
ProgressDelegate::ProgressDelegate |
( |
void |
| ) |
|
|
protected |
virtual bool ProgressDelegate::getCancelled |
( |
void |
| ) |
|
|
pure virtual |
This method should be implemented to indicate whether some user-defined event indicates that the operation should be terminated.
- Returns
- return true to cancel the long-running operation
Implemented in PercentProgressDelegate.
double ProgressDelegate::getProgress |
( |
void |
| ) |
const |
This method returns the progress.
- Returns
- returns the a number between 0 and 1.
virtual void ProgressDelegate::reportProgress |
( |
double |
progress, |
|
|
const char * |
message |
|
) |
| |
|
pure virtual |
This method should be implemented to report to the client application the progress of a long-running operation.
- Parameters
-
progress | a value between 0 and 1 (progress = <work completed>=""> / <total work>="">) |
Implemented in PercentProgressDelegate.
void ProgressDelegate::setTotal |
( |
double |
total | ) |
|
This method sets the total amount of work that must be done. This value is used as denominator.
- Parameters
-
total | the total work for the ProgressDelgate |
void ProgressDelegate::updateCompleted |
( |
double |
delta, |
|
|
const char * |
message |
|
) |
| |
This method adds delta to the amount of work done.
- Parameters
-
delta | the amount of work to add to the work accumulator |
message | a tag for who the caller is |
The documentation for this class was generated from the following file: