MrSID Decode SDK for LiDAR Reference Manual
1.1.3.4427
|
ProgressDelegate is the base class for progress and interrupt reporting. More...
#include <ProgressDelegate.h>
Public Member Functions | |
virtual | ~ProgressDelegate (void) |
virtual void | reportProgress (double progress, const char *message)=0 |
Displays the progress of the operation. | |
virtual bool | getCancelled (void)=0 |
Indicate weather the operation should be cancelled. | |
void | setTotal (double total) |
Set the total amount of work that must be done. | |
void | updateCompleted (double delta, const char *message) |
Update the amount of work that has been done. | |
double | getProgress (void) const |
Get the fraction the work completed. | |
Protected Member Functions | |
ProgressDelegate (void) |
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.
Implemented in PercentProgressDelegate.
double ProgressDelegate::getProgress | ( | void | ) | const |
This method returns the progress.
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.
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.
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.
delta | the amount of work to add to the work accumulator |
message | a tag for who the caller is |