VTK  9.3.20240328
vtkDemandDrivenPipeline.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
47 #ifndef vtkDemandDrivenPipeline_h
48 #define vtkDemandDrivenPipeline_h
49 
50 #include "vtkCommonExecutionModelModule.h" // For export macro
51 #include "vtkExecutive.h"
52 
53 VTK_ABI_NAMESPACE_BEGIN
54 class vtkAbstractArray;
55 class vtkDataArray;
57 class vtkDemandDrivenPipelineInternals;
58 class vtkFieldData;
59 class vtkInformation;
64 
71 
72 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkDemandDrivenPipeline : public vtkExecutive
73 {
74 public:
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78 
84  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
85 
90  vtkInformationVector* outInfoVec, int requestFromOutputPort, vtkMTimeType* mtime) override;
91 
93 
97  vtkTypeBool Update() override;
98  vtkTypeBool Update(int port) override;
100 
102 
105  vtkGetMacro(PipelineMTime, vtkMTimeType);
107 
112  virtual int SetReleaseDataFlag(int port, vtkTypeBool n);
113 
118 
122  virtual int UpdatePipelineMTime();
123 
129  int UpdateDataObject() override;
130 
134  int UpdateInformation() override;
135 
141  virtual int UpdateData(int outputPort);
142 
148 
154 
160 
167 
174 
182 
188  static vtkDataObject* NewDataObject(const char* type);
189 
190 protected:
193 
194  // Helper methods to send requests to the algorithm.
195  virtual int ExecuteDataObject(
196  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
197  virtual int ExecuteInformation(
198  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
199  virtual int ExecuteData(
200  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
201 
202  // Reset the pipeline update values in the given output information object.
204 
205  // Check whether the data object in the pipeline information for an
206  // output port exists and has a valid type.
207  virtual int CheckDataObject(int port, vtkInformationVector* outInfo);
208 
209  // Input connection validity checkers.
218 
219  // Field existence checkers.
223 
224  // Input port information checkers.
227 
228  // Decide whether the output data need to be generated.
229  virtual int NeedToExecuteData(
230  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
231 
232  // Handle before/after operations for ExecuteData method.
233  virtual void ExecuteDataStart(
234  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
235  virtual void ExecuteDataEnd(
236  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
237  virtual void MarkOutputsGenerated(
238  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
239 
240  // Largest MTime of any algorithm on this executive or preceding
241  // executives.
243 
244  // Time when information or data were last generated.
248 
250 
254 
255 private:
257  void operator=(const vtkDemandDrivenPipeline&) = delete;
258 };
259 
260 VTK_ABI_NAMESPACE_END
261 #endif
Abstract superclass for all arrays.
Executive supporting composite datasets.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:154
general representation of visualization data
represent and manipulate attribute data in a dataset
Executive supporting on-demand execution.
void ResetPipelineInformation(int, vtkInformation *) override
int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime) override
Implement the pipeline modified time request.
int UpdateInformation() override
Bring the output information up to date.
int InputIsOptional(int port)
virtual int UpdatePipelineMTime()
Bring the PipelineMTime up to date.
int InputCountIsValid(int port, vtkInformationVector **)
virtual void MarkOutputsGenerated(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual int UpdateData(int outputPort)
Bring the output data up to date.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
Generalized interface for asking the executive to fulfill update requests.
virtual int ExecuteInformation(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
int InputTypeIsValid(vtkInformationVector **)
virtual int ExecuteData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
static vtkDemandDrivenPipeline * New()
int ArrayIsValid(vtkAbstractArray *array, vtkInformation *field)
int InputFieldsAreValid(vtkInformationVector **)
virtual int CheckDataObject(int port, vtkInformationVector *outInfo)
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual vtkTypeBool GetReleaseDataFlag(int port)
Get whether the given output port releases data when it is consumed.
vtkTypeBool Update() override
Bring the algorithm's outputs up-to-date.
int InputCountIsValid(vtkInformationVector **)
int FieldArrayExists(vtkFieldData *data, vtkInformation *field)
virtual int SetReleaseDataFlag(int port, vtkTypeBool n)
Set whether the given output port releases data when it is consumed.
vtkTypeBool Update(int port) override
Bring the algorithm's outputs up-to-date.
virtual int InputTypeIsValid(int port, int index, vtkInformationVector **)
int InputTypeIsValid(int port, vtkInformationVector **)
virtual int NeedToExecuteData(int outputPort, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual int InputFieldsAreValid(int port, int index, vtkInformationVector **)
virtual int ExecuteDataObject(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
int UpdateDataObject() override
Bring the output data object's existence up to date.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int InputFieldsAreValid(int port, vtkInformationVector **)
~vtkDemandDrivenPipeline() override
int DataSetAttributeExists(vtkDataSetAttributes *dsa, vtkInformation *field)
static vtkDataObject * NewDataObject(const char *type)
Create (New) and return a data object of the given type.
int InputIsRepeatable(int port)
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:68
represent and manipulate fields of data
Definition: vtkFieldData.h:161
a simple class to control print indentation
Definition: vtkIndent.h:108
Key for integer values in vtkInformation.
Key for vector-of-keys values.
Key for pointer to pointer.
Key for unsigned long values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:44
static vtkInformationRequestKey * REQUEST_INFORMATION()
Key defining a request to make sure the output information is up to date.
static vtkInformationRequestKey * REQUEST_DATA_NOT_GENERATED()
Key defining a request to mark outputs that will NOT be generated during a REQUEST_DATA.
static vtkInformationIntegerKey * RELEASE_DATA()
Key to specify in pipeline information the request that data be released after it is used.
static vtkInformationIntegerKey * DATA_NOT_GENERATED()
Key to store a mark for an output that will not be generated.
static vtkInformationRequestKey * REQUEST_DATA()
Key defining a request to make sure the output data are up to date.
static vtkInformationRequestKey * REQUEST_DATA_OBJECT()
Key defining a request to make sure the output data objects exist.
@ field
Definition: vtkX3D.h:177
@ port
Definition: vtkX3D.h:447
@ type
Definition: vtkX3D.h:516
@ index
Definition: vtkX3D.h:246
@ data
Definition: vtkX3D.h:315
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270