VTK
|
Progress observer that is thread safe. More...
#include <vtkSMPProgressObserver.h>
Public Types | |
typedef vtkProgressObserver | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkSMPProgressObserver * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | UpdateProgress (double amount) |
vtkProgressObserver * | GetLocalObserver () |
Static Public Member Functions | |
static vtkSMPProgressObserver * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMPProgressObserver * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkSMPProgressObserver () | |
~vtkSMPProgressObserver () | |
Protected Attributes | |
vtkSMPThreadLocalObject < vtkProgressObserver > | Observers |
Progress observer that is thread safe.
vtkSMPProgressObserver is designed to handle progress events coming from an algorithm in a thread safe way. It does this by using thread local objects that it updates. To receive the progress information, one has to listen to the local observer in the same thread. Since the execution will be somewhat load balanced, it may be enough to do this only on the main thread.
Definition at line 33 of file vtkSMPProgressObserver.h.
Reimplemented from vtkProgressObserver.
Definition at line 37 of file vtkSMPProgressObserver.h.
vtkSMPProgressObserver::vtkSMPProgressObserver | ( | ) | [protected] |
vtkSMPProgressObserver::~vtkSMPProgressObserver | ( | ) | [protected] |
static vtkSMPProgressObserver* vtkSMPProgressObserver::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkProgressObserver.
static int vtkSMPProgressObserver::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 vtkProgressObserver.
virtual int vtkSMPProgressObserver::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 vtkProgressObserver.
static vtkSMPProgressObserver* vtkSMPProgressObserver::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkProgressObserver.
virtual vtkObjectBase* vtkSMPProgressObserver::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkProgressObserver.
Reimplemented from vtkProgressObserver.
void vtkSMPProgressObserver::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 vtkProgressObserver.
void vtkSMPProgressObserver::UpdateProgress | ( | double | amount | ) | [virtual] |
Passes the progress event to a thread local ProgressObserver instance.
Reimplemented from vtkProgressObserver.
vtkProgressObserver* vtkSMPProgressObserver::GetLocalObserver | ( | ) | [inline] |
Returns the progress observer local to the thread it was called from.
Definition at line 46 of file vtkSMPProgressObserver.h.
Definition at line 56 of file vtkSMPProgressObserver.h.