TuttleOFX  1
tuttle::plugin::OfxProgress Class Reference

#include <OfxProgress.hpp>

Inheritance diagram for tuttle::plugin::OfxProgress:
Collaboration diagram for tuttle::plugin::OfxProgress:

Public Member Functions

 OfxProgress (OFX::ImageEffect &effect)
virtual ~OfxProgress ()
void progressBegin (const int numSteps, const std::string &msg="")
 Start the algorithm progress bar.
void progressEnd ()
 Ends the algorithm progress bar.
bool progressForward (const int nSteps)
 Put the progress bar forward.
bool progressUpdate (const double p)
OfxProgressgetOfxProgress ()

Protected Attributes

double _stepSize
 Step size of progess bar.
double _counter
 Current position in [0; 1].

Private Member Functions

OfxProgressoperator= (const OfxProgress &p)

Private Attributes

OFX::ImageEffect_effect
 Used to access Ofx progress bar.
OFX::MultiThread::Mutex _mutex

Detailed Description

Definition at line 22 of file OfxProgress.hpp.


Constructor & Destructor Documentation

tuttle::plugin::OfxProgress::OfxProgress ( OFX::ImageEffect effect) [inline]

Definition at line 34 of file OfxProgress.hpp.

virtual tuttle::plugin::OfxProgress::~OfxProgress ( ) [inline, virtual]

Definition at line 41 of file OfxProgress.hpp.


Member Function Documentation

OfxProgress & tuttle::plugin::OfxProgress::operator= ( const OfxProgress p) [private]

Definition at line 68 of file OfxProgress.cpp.

References _counter, and _stepSize.

void tuttle::plugin::OfxProgress::progressBegin ( const int  numSteps,
const std::string &  msg = "" 
) [virtual]

Start the algorithm progress bar.

Parameters:
[in]numStepsnumber of steps

Implements tuttle::plugin::IProgress.

Definition at line 14 of file OfxProgress.cpp.

References _counter, _effect, _stepSize, and OFX::ImageEffect::progressStart().

Referenced by tuttle::plugin::sobel::SobelProcess< SView, DView >::preProcess(), tuttle::plugin::pushPixel::PushPixelProcess< View >::preProcess(), and tuttle::plugin::ImageProcessor::preProcess().

Here is the call graph for this function:

void tuttle::plugin::OfxProgress::progressEnd ( ) [virtual]

Ends the algorithm progress bar.

Implements tuttle::plugin::IProgress.

Definition at line 60 of file OfxProgress.cpp.

References _effect, _mutex, OFX::MultiThread::Mutex::lock(), OFX::ImageEffect::progressEnd(), and OFX::MultiThread::Mutex::unlock().

Referenced by tuttle::plugin::ImageProcessor::postProcess(), and tuttle::plugin::ImageProcessor::setupAndProcess().

Here is the call graph for this function:

bool tuttle::plugin::OfxProgress::progressForward ( const int  nSteps) [virtual]

Put the progress bar forward.

Parameters:
[in]nStepsNumber of steps processed since last call.
Returns:
true = effect aborted, false = continu rendering
Todo:
why not unlock the mutex here?

Implements tuttle::plugin::IProgress.

Definition at line 30 of file OfxProgress.cpp.

References _counter, _effect, _mutex, _stepSize, OFX::ImageEffect::abort(), OFX::MultiThread::Mutex::lock(), OFX::ImageEffect::progressEnd(), OFX::ImageEffect::progressUpdate(), and OFX::MultiThread::Mutex::unlock().

Referenced by tuttle::plugin::sobel::SobelProcess< SView, DView >::computeGradientDirection(), and tuttle::plugin::sobel::SobelProcess< SView, DView >::multiThreadProcessImages().

Here is the call graph for this function:

bool tuttle::plugin::OfxProgress::progressUpdate ( const double  p)

Field Documentation

Current position in [0; 1].

Definition at line 31 of file OfxProgress.hpp.

Referenced by operator=(), progressBegin(), progressForward(), and progressUpdate().

Used to access Ofx progress bar.

Reimplemented in tuttle::plugin::ImageProcessor.

Definition at line 25 of file OfxProgress.hpp.

Referenced by progressBegin(), progressEnd(), progressForward(), and progressUpdate().

Step size of progess bar.

Definition at line 30 of file OfxProgress.hpp.

Referenced by operator=(), progressBegin(), and progressForward().


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