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::getOfxProgress ( ) [inline]

Definition at line 49 of file OfxProgress.hpp.

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, and _stepSize.

Referenced by tuttle::plugin::ImageProcessor::preProcess().

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, and _mutex.

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

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, and _stepSize.

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

Definition at line 46 of file OfxProgress.cpp.

References _counter, and _effect.


Field Documentation

Current position in [0; 1].

Definition at line 31 of file OfxProgress.hpp.

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

OFX::ImageEffect& tuttle::plugin::OfxProgress::_effect [private]

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().

OFX::MultiThread::Mutex tuttle::plugin::OfxProgress::_mutex [private]

Definition at line 26 of file OfxProgress.hpp.

Referenced by progressEnd(), and progressForward().

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: