mta::MultiPhaseProgressReporter Class Reference

Use this class to report progress from a multi-phase algorithm. More...

#include <MultiThreadedAlgorithm.h>

Inheritance diagram for mta::MultiPhaseProgressReporter:

Inheritance graph

List of all members.

Public Member Functions

 MultiPhaseProgressReporter (ProgressReporter &base, const std::vector< int > &phaseWeights)
virtual ~MultiPhaseProgressReporter ()
void reportProgress (int percent)
void reportError (const std::string &text)
void setCurrentPhase (int phase)
int getCurrentPhase () const


Detailed Description

Use this class to report progress from a multi-phase algorithm.

Definition at line 578 of file MultiThreadedAlgorithm.h.


Constructor & Destructor Documentation

mta::MultiPhaseProgressReporter::MultiPhaseProgressReporter ( ProgressReporter base,
const std::vector< int > &  phaseWeights 
)

Constructor.

Parameters:
base ProgressReporter used for reports.
phaseWeights How much each phase contributes to the overall progress.

Definition at line 589 of file MultiThreadedAlgorithm.h.

virtual mta::MultiPhaseProgressReporter::~MultiPhaseProgressReporter (  )  [virtual]

Destructor.

Definition at line 595 of file MultiThreadedAlgorithm.h.


Member Function Documentation

void mta::MultiPhaseProgressReporter::reportProgress ( int  percent  )  [virtual]

Report progress percent.

Parameters:
percent The percent completion.

Implements mta::ProgressReporter.

void mta::MultiPhaseProgressReporter::reportError ( const std::string &  text  )  [virtual]

Report an error.

Parameters:
text The error message.

Implements mta::ProgressReporter.

void mta::MultiPhaseProgressReporter::setCurrentPhase ( int  phase  ) 

Set the current algorithm phase.

Parameters:
phase The phase the algorithm is executing.

int mta::MultiPhaseProgressReporter::getCurrentPhase (  )  const

Access the current algorithm phase.

Returns:
The current phase.


Software Development Kit - Opticks 4.9.0 Build 16218