BProgressReporter Class Reference

#include <BProgressReporter.h>

List of all members.


Detailed Description

An interface for objects that receive progress reports during read and write operations.

No default implementation for this interface is supplied. In order to make use of progress reporting, derive a class from BProgressReporter and implement the Report method. Instantiate the derrived class and pass it to the BDataManager::SetProgressReporter method.

Public Member Functions

 BProgressReporter (UInt32 fint)
 Constructs a BProgressReporter that makes progress reports at the specified interval.
 BProgressReporter (void)
 Default constructor.
UInt32 GetFeatureInterval (void) const
 Gets the feature interval.
virtual bool IsTimeToReportProgress (UInt32 featureNum, UInt32 totNumFeats=0) const
 Indicate whether or not the a progress report should be made for the specified degree of progress.
virtual bool Report (UInt32 featureNum, UInt32 totNumFeats=0) const =0
 Reports the current progress and indicates whether or not the current operation should continue.
void SetFeatureInterval (UInt32 fint)
 Sets the feature interval.

Protected Attributes

UInt32 m_featureInterval
 The feature interval.


Constructor & Destructor Documentation

BProgressReporter ( void   )  [inline]

Default constructor.

BProgressReporter ( UInt32  fint  )  [inline]

Constructs a BProgressReporter that makes progress reports at the specified interval.

Parameters:
fint The feature interval. Each time this number of features are read or written, a progress report will be made.


Member Function Documentation

UInt32 GetFeatureInterval ( void   )  const [inline]

Gets the feature interval.

Returns:
The feature interval. Each time this number of features are read or written, a progress report will be made.

virtual bool IsTimeToReportProgress ( UInt32  featureNum,
UInt32  totNumFeats = 0 
) const [inline, virtual]

Indicate whether or not the a progress report should be made for the specified degree of progress.

Parameters:
featureNum The current feature number.
totNumFeats The total number of features.
Returns:
True if it is time to call Report and false otherwise.

virtual bool Report ( UInt32  featureNum,
UInt32  totNumFeats = 0 
) const [pure virtual]

Reports the current progress and indicates whether or not the current operation should continue.

Derived classes must implement this method to report progress in whatever way is relevant.

Parameters:
featureNum The current feature number.
totNumFeats The total number of features to be processed. If the value is zero, then the total number of features is unknown.
Returns:
True if the operation should continue and false otherwise.

void SetFeatureInterval ( UInt32  fint  )  [inline]

Sets the feature interval.

Parameters:
fint The feature interval. Each time this number of features are read or written, a progress report will be made.


Member Data Documentation

UInt32 m_featureInterval [protected]

The feature interval.

Each time this number of features are read or written, a progress report will be made.


The documentation for this class was generated from the following file:

GeoTranslate 5.0 From Blue Marble Geographics