mta::ThreadReporter Class Reference

Report progress and errors from a thread. More...

#include <MultiThreadedAlgorithm.h>

Inheritance diagram for mta::ThreadReporter:

Inheritance graph

List of all members.

Public Member Functions

virtual Result reportProgress (int threadIndex, int percentDone)=0
virtual Result reportCompletion (int threadIndex)=0
virtual Result reportError (std::string errorText)=0
virtual std::string getErrorText () const =0
virtual int getProgress (int threadIndex) const =0
virtual void runInMainThread (ThreadCommand &command)=0


Detailed Description

Report progress and errors from a thread.

Definition at line 72 of file MultiThreadedAlgorithm.h.


Member Function Documentation

virtual Result mta::ThreadReporter::reportProgress ( int  threadIndex,
int  percentDone 
) [pure virtual]

Send a progress report form a thread.

Parameters:
threadIndex ID number for the current thread.
percentDone How much of this thread's progress has completed.
Returns:
The result of the operation.

Implemented in mta::MultiThreadReporter.

virtual Result mta::ThreadReporter::reportCompletion ( int  threadIndex  )  [pure virtual]

Indicate that a thread has completed execution.

Parameters:
threadIndex ID number for the current thread.
Returns:
The result of the operation.

Implemented in mta::MultiThreadReporter.

virtual Result mta::ThreadReporter::reportError ( std::string  errorText  )  [pure virtual]

Report an error.

Parameters:
errorText Description of the error.
Returns:
The result of the operation.

Implemented in mta::MultiThreadReporter.

virtual std::string mta::ThreadReporter::getErrorText (  )  const [pure virtual]

Access the most recent error.

Returns:
The description of the most recent error.

Implemented in mta::MultiThreadReporter.

virtual int mta::ThreadReporter::getProgress ( int  threadIndex  )  const [pure virtual]

Access the progress of a thread.

Parameters:
threadIndex The ID of the thread to check.
Returns:
Percent complete for the thread.

Implemented in mta::MultiThreadReporter.

virtual void mta::ThreadReporter::runInMainThread ( ThreadCommand command  )  [pure virtual]

Perform an action in the main thread.

Parameters:
command The action to run in the main thread.

Implemented in mta::MultiThreadReporter.


Software Development Kit - Opticks 4.9.0 Build 16218