1 /*=========================================================================
6 Copyright (c) Kitware, Inc.
8 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
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.
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).
21 // vtkPVCacheKeeper vtkUpdateSuppressorPipeline
23 #ifndef __vtkPVUpdateSuppressor_h
24 #define __vtkPVUpdateSuppressor_h
26 #include "vtkDataObjectAlgorithm.h"
28 class VTK_EXPORT vtkPVUpdateSuppressor : public vtkDataObjectAlgorithm
31 vtkTypeRevisionMacro(vtkPVUpdateSuppressor,vtkDataObjectAlgorithm);
32 void PrintSelf(ostream& os, vtkIndent indent);
35 // Construct with user-specified implicit function.
36 static vtkPVUpdateSuppressor *New();
39 // Force update on the input.
40 virtual void ForceUpdate();
43 // Set number of pieces and piece on the data.
44 // This causes the filter to ingore the request from the output.
45 // It is here because the user may not have celled update on the output
46 // before calling force update (it is an easy fix).
47 vtkSetMacro(UpdatePiece, int);
48 vtkGetMacro(UpdatePiece, int);
49 vtkSetMacro(UpdateNumberOfPieces, int);
50 vtkGetMacro(UpdateNumberOfPieces, int);
53 // Get/Set if the update suppressor is enabled. If the update suppressor
54 // is not enabled, it won't supress any updates. Enabled by default.
56 vtkGetMacro(Enabled, int);
59 // Get/Set the update time that is sent up the pipeline.
60 void SetUpdateTime(double utime);
61 vtkGetMacro(UpdateTime, double);
64 vtkPVUpdateSuppressor();
65 ~vtkPVUpdateSuppressor();
67 int RequestDataObject(vtkInformation* request, vtkInformationVector **inputVector,
68 vtkInformationVector *outputVector);
69 int RequestData(vtkInformation* request, vtkInformationVector **inputVector,
70 vtkInformationVector *outputVector);
73 int UpdateNumberOfPieces;
76 bool UpdateTimeInitialized;
80 vtkTimeStamp PipelineUpdateTime;
83 // Create a default executive.
84 virtual vtkExecutive* CreateDefaultExecutive();
87 vtkPVUpdateSuppressor(const vtkPVUpdateSuppressor&); // Not implemented.
88 void operator=(const vtkPVUpdateSuppressor&); // Not implemented.