Salome HOME
Fix make distcheck error (merge from V6_4_BR branch)
[modules/smesh.git] / src / OBJECT / SMESH_vtkPVUpdateSuppressor.h
1 /*=========================================================================
2
3  Program:   ParaView
4  Module:    $RCSfile$
5
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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  =========================================================================*/
15 // .NAME vtkPVUpdateSuppressor - prevents propagation of update
16 // .SECTION Description 
17 // vtkPVUpdateSuppressor now uses the vtkProcessModule singleton to set up the
18 // default values for UpdateNumberOfPieces and UpdatePiece, so we no longer have
19 // to set the default values (in most cases).
20 // .SECTION See Also
21 // vtkPVCacheKeeper vtkUpdateSuppressorPipeline
22
23 #ifndef __vtkPVUpdateSuppressor_h
24 #define __vtkPVUpdateSuppressor_h
25
26 #include "vtkDataObjectAlgorithm.h"
27
28 class VTK_EXPORT vtkPVUpdateSuppressor: public vtkDataObjectAlgorithm
29 {
30 public:
31 vtkTypeRevisionMacro(vtkPVUpdateSuppressor,vtkDataObjectAlgorithm)
32   ;
33   void PrintSelf(ostream& os, vtkIndent indent);
34
35   // Description:
36   // Construct with user-specified implicit function.
37   static vtkPVUpdateSuppressor *New();
38
39   // Description:
40   // Force update on the input.
41   virtual void ForceUpdate();
42
43   // Description:
44   // Set number of pieces and piece on the data.
45   // This causes the filter to ingore the request from the output.
46   // It is here because the user may not have celled update on the output
47   // before calling force update (it is an easy fix).
48   vtkSetMacro(UpdatePiece, int)
49   ;
50   vtkGetMacro(UpdatePiece, int)
51   ;
52   vtkSetMacro(UpdateNumberOfPieces, int)
53   ;
54   vtkGetMacro(UpdateNumberOfPieces, int)
55   ;
56
57   // Description:
58   // Get/Set if the update suppressor is enabled. If the update suppressor 
59   // is not enabled, it won't supress any updates. Enabled by default.
60   void SetEnabled(int);
61   vtkGetMacro(Enabled, int)
62   ;
63
64   // Description:
65   // Get/Set the update time that is sent up the pipeline.
66   void SetUpdateTime(double utime);
67   vtkGetMacro(UpdateTime, double)
68   ;
69
70 protected:
71   vtkPVUpdateSuppressor();
72   ~vtkPVUpdateSuppressor();
73
74   int RequestDataObject(vtkInformation* request,
75                         vtkInformationVector **inputVector,
76                         vtkInformationVector *outputVector);
77   int RequestData(vtkInformation* request, vtkInformationVector **inputVector,
78                   vtkInformationVector *outputVector);
79
80   int UpdatePiece;
81   int UpdateNumberOfPieces;
82   double UpdateTime;
83
84   bool UpdateTimeInitialized;
85
86   int Enabled;
87
88   vtkTimeStamp PipelineUpdateTime;
89
90   // Create a default executive.
91   virtual vtkExecutive* CreateDefaultExecutive();
92
93 private:
94   vtkPVUpdateSuppressor(const vtkPVUpdateSuppressor&); // Not implemented.
95   void operator=(const vtkPVUpdateSuppressor&); // Not implemented.
96 };
97
98 #endif