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 =========================================================================*/
26 #ifndef vtkSMPProgressObserver_h
27 #define vtkSMPProgressObserver_h
28 
29 #include "vtkCommonExecutionModelModule.h" // For export macro
30 #include "vtkProgressObserver.h"
31 #include "vtkSMPThreadLocalObject.h" // For thread local observers.
32 
34 {
35 public:
36  static vtkSMPProgressObserver *New();
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
42  void UpdateProgress(double amount);
43 
45 
47  {
48  return this->Observers.Local();
49  }
51 
52 protected:
55 
57 
58 private:
59  vtkSMPProgressObserver(const vtkSMPProgressObserver&); // Not implemented.
60  void operator=(const vtkSMPProgressObserver&); // Not implemented.
61 };
62 
63 #endif
#define VTKCOMMONEXECUTIONMODEL_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
static vtkProgressObserver * New()
Progress observer that is thread safe.
virtual void UpdateProgress(double amount)
vtkProgressObserver * GetLocalObserver()
Basic class to optionally replace vtkAlgorithm progress functionality.
vtkSMPThreadLocalObject< vtkProgressObserver > Observers