VTK  9.0.3
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 
34 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkSMPProgressObserver : public vtkProgressObserver
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  void UpdateProgress(double amount) override;
46 
51  vtkProgressObserver* GetLocalObserver() { return this->Observers.Local(); }
52 
53 protected:
56 
58 
59 private:
61  void operator=(const vtkSMPProgressObserver&) = delete;
62 };
63 
64 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
Basic class to optionally replace vtkAlgorithm progress functionality.
Progress observer that is thread safe.
vtkSMPThreadLocalObject< vtkProgressObserver > Observers
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void UpdateProgress(double amount) override
Passes the progress event to a thread local ProgressObserver instance.
vtkProgressObserver * GetLocalObserver()
Returns the progress observer local to the thread it was called from.
static vtkSMPProgressObserver * New()
~vtkSMPProgressObserver() override