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 
34 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkSMPProgressObserver : public vtkProgressObserver
35 {
36 public:
37  static vtkSMPProgressObserver *New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
45  void UpdateProgress(double amount) override;
46 
52  {
53  return this->Observers.Local();
54  }
55 
56 protected:
58  ~vtkSMPProgressObserver() override;
59 
61 
62 private:
64  void operator=(const vtkSMPProgressObserver&) = delete;
65 };
66 
67 #endif
a simple class to control print indentation
Definition: vtkIndent.h:39
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