VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkProgressObserver Class Reference

Basic class to optionally replace vtkAlgorithm progress functionality. More...

#include <vtkProgressObserver.h>

Inheritance diagram for vtkProgressObserver:
Inheritance graph
[legend]
Collaboration diagram for vtkProgressObserver:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkObject Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkProgressObserverNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void UpdateProgress (double amount)
virtual double GetProgress ()

Static Public Member Functions

static vtkProgressObserverNew ()
static int IsTypeOf (const char *type)
static vtkProgressObserverSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkProgressObserver ()
 ~vtkProgressObserver ()

Protected Attributes

double Progress

Detailed Description

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.

Events:
vtkCommand::ProgressEvent

Definition at line 38 of file vtkProgressObserver.h.


Member Typedef Documentation

Reimplemented from vtkObject.

Reimplemented in vtkSMPProgressObserver.

Definition at line 42 of file vtkProgressObserver.h.


Constructor & Destructor Documentation


Member Function Documentation

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.

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.

Returns the progress reported by the algorithm.


Member Data Documentation

Definition at line 58 of file vtkProgressObserver.h.


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