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)
33 void PrintSelf(ostream& os, vtkIndent indent);
36 // Construct with user-specified implicit function.
37 static vtkPVUpdateSuppressor *New();
40 // Force update on the input.
41 virtual void ForceUpdate();
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)
50 vtkGetMacro(UpdatePiece, int)
52 vtkSetMacro(UpdateNumberOfPieces, int)
54 vtkGetMacro(UpdateNumberOfPieces, int)
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.
61 vtkGetMacro(Enabled, int)
65 // Get/Set the update time that is sent up the pipeline.
66 void SetUpdateTime(double utime);
67 vtkGetMacro(UpdateTime, double)
71 vtkPVUpdateSuppressor();
72 ~vtkPVUpdateSuppressor();
74 int RequestDataObject(vtkInformation* request,
75 vtkInformationVector **inputVector,
76 vtkInformationVector *outputVector);
77 int RequestData(vtkInformation* request, vtkInformationVector **inputVector,
78 vtkInformationVector *outputVector);
81 int UpdateNumberOfPieces;
84 bool UpdateTimeInitialized;
88 vtkTimeStamp PipelineUpdateTime;
90 // Create a default executive.
91 virtual vtkExecutive* CreateDefaultExecutive();
94 vtkPVUpdateSuppressor(const vtkPVUpdateSuppressor&); // Not implemented.
95 void operator=(const vtkPVUpdateSuppressor&); // Not implemented.