VTK
vtkSMPProgressObserver.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSMPProgressObserver.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
27#ifndef vtkSMPProgressObserver_h
28#define vtkSMPProgressObserver_h
29
30#include "vtkCommonExecutionModelModule.h" // For export macro
31#include "vtkProgressObserver.h"
32#include "vtkSMPThreadLocalObject.h" // For thread local observers.
33
34class VTKCOMMONEXECUTIONMODEL_EXPORT vtkSMPProgressObserver : public vtkProgressObserver
35{
36public:
39 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40
45 void UpdateProgress(double amount) VTK_OVERRIDE;
46
52 {
53 return this->Observers.Local();
54 }
55
56protected:
59
61
62private:
63 vtkSMPProgressObserver(const vtkSMPProgressObserver&) VTK_DELETE_FUNCTION;
64 void operator=(const vtkSMPProgressObserver&) VTK_DELETE_FUNCTION;
65};
66
67#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
Basic class to optionally replace vtkAlgorithm progress functionality.
Progress observer that is thread safe.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkProgressObserver * GetLocalObserver()
Returns the progress observer local to the thread it was called from.
void UpdateProgress(double amount) override
Passes the progress event to a thread local ProgressObserver instance.
static vtkSMPProgressObserver * New()
~vtkSMPProgressObserver() override
Thread local storage for VTK objects.