VTK
|
Basic class to optionally replace vtkAlgorithm progress functionality. More...
#include <vtkProgressObserver.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkProgressObserver * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | UpdateProgress (double amount) |
virtual double | GetProgress () |
Static Public Member Functions | |
static vtkProgressObserver * | New () |
static int | IsTypeOf (const char *type) |
static vtkProgressObserver * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkProgressObserver () | |
~vtkProgressObserver () | |
Protected Attributes | |
double | Progress |
Basic class to optionally replace vtkAlgorithm progress functionality.
When the basic functionality in vtkAlgorithm that reports progress is not enough, a subclass of vtkProgressObserver can be used to provide custom functionality. The main use case for this is when an algorithm's RequestData() is called from multiple threads in parallel - the basic functionality in vtkAlgorithm is not thread safe. vtkSMPProgressObserver can handle this situation by routing progress from each thread to a thread local vtkProgressObserver, which will invoke events separately for each thread.
Definition at line 38 of file vtkProgressObserver.h.
Reimplemented from vtkObject.
Reimplemented in vtkSMPProgressObserver.
Definition at line 42 of file vtkProgressObserver.h.
vtkProgressObserver::vtkProgressObserver | ( | ) | [protected] |
vtkProgressObserver::~vtkProgressObserver | ( | ) | [protected] |
static vtkProgressObserver* vtkProgressObserver::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
Reimplemented in vtkSMPProgressObserver.
static int vtkProgressObserver::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkSMPProgressObserver.
virtual int vtkProgressObserver::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObject.
Reimplemented in vtkSMPProgressObserver.
static vtkProgressObserver* vtkProgressObserver::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
Reimplemented in vtkSMPProgressObserver.
virtual vtkObjectBase* vtkProgressObserver::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
Reimplemented in vtkSMPProgressObserver.
Reimplemented from vtkObject.
Reimplemented in vtkSMPProgressObserver.
void vtkProgressObserver::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkObject.
Reimplemented in vtkSMPProgressObserver.
virtual void vtkProgressObserver::UpdateProgress | ( | double | amount | ) | [virtual] |
The default behavior is to update the Progress data member and invoke a ProgressEvent. This is designed to be overwritten.
Reimplemented in vtkSMPProgressObserver.
virtual double vtkProgressObserver::GetProgress | ( | ) | [virtual] |
Returns the progress reported by the algorithm.
double vtkProgressObserver::Progress [protected] |
Definition at line 58 of file vtkProgressObserver.h.