VTK  9.3.1
vtkSMPProgressObserver.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
15 #ifndef vtkSMPProgressObserver_h
16 #define vtkSMPProgressObserver_h
17 
18 #include "vtkCommonExecutionModelModule.h" // For export macro
19 #include "vtkProgressObserver.h"
20 #include "vtkSMPThreadLocalObject.h" // For thread local observers.
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkSMPProgressObserver : public vtkProgressObserver
24 {
25 public:
26  static vtkSMPProgressObserver* New();
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
34  void UpdateProgress(double progress) override;
35 
40  vtkProgressObserver* GetLocalObserver() { return this->Observers.Local(); }
41 
42 protected:
44  ~vtkSMPProgressObserver() override;
45 
47 
48 private:
50  void operator=(const vtkSMPProgressObserver&) = delete;
51 };
52 
53 VTK_ABI_NAMESPACE_END
54 #endif
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkProgressObserver * New()
Progress observer that is thread safe.
virtual void UpdateProgress(double amount)
The default behavior is to update the Progress data member and invoke a ProgressEvent.
vtkProgressObserver * GetLocalObserver()
Returns the progress observer local to the thread it was called from.
Basic class to optionally replace vtkAlgorithm progress functionality.
vtkSMPThreadLocalObject< vtkProgressObserver > Observers