VTK  9.4.20251007
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
17
18#ifndef vtkDemandDrivenPipeline_h
19#define vtkDemandDrivenPipeline_h
20
21#include "vtkCommonExecutionModelModule.h" // For export macro
22#include "vtkExecutive.h"
23#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24
25VTK_ABI_NAMESPACE_BEGIN
27class vtkDataArray;
29class vtkDemandDrivenPipelineInternals;
30class vtkFieldData;
31class vtkInformation;
36
43
44class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALAUTO vtkDemandDrivenPipeline : public vtkExecutive
45{
46public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
56 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
57
62 vtkInformationVector* outInfoVec, int requestFromOutputPort, vtkMTimeType* mtime) override;
63
65
69 vtkTypeBool Update() override;
70 vtkTypeBool Update(int port) override;
72
74
79
84 virtual int SetReleaseDataFlag(int port, vtkTypeBool n);
85
90
94 virtual int UpdatePipelineMTime();
95
101 int UpdateDataObject() override;
102
106 int UpdateInformation() override;
107
113 virtual int UpdateData(int outputPort);
114
120
126
132
139
146
154
160 static vtkDataObject* NewDataObject(const char* type);
161
162protected:
165
166 // Helper methods to send requests to the algorithm.
167 virtual int ExecuteDataObject(
168 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
170 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
171 virtual int ExecuteData(
172 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
173
174 // Reset the pipeline update values in the given output information object.
176
177 // Check whether the data object in the pipeline information for an
178 // output port exists and has a valid type.
179 virtual int CheckDataObject(int port, vtkInformationVector* outInfo);
180
181 // Input connection validity checkers.
186 virtual int InputTypeIsValid(int port, int index, vtkInformationVector**);
189 virtual int InputFieldsAreValid(int port, int index, vtkInformationVector**);
190
191 // Field existence checkers.
195
196 // Input port information checkers.
197 int InputIsOptional(int port);
198 int InputIsRepeatable(int port);
199
200 // Decide whether the output data need to be generated.
201 virtual int NeedToExecuteData(
202 int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
203
204 // Handle before/after operations for ExecuteData method.
205 virtual void ExecuteDataStart(
206 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
207 virtual void ExecuteDataEnd(
208 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
210 vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
211
212 // Largest MTime of any algorithm on this executive or preceding
213 // executives.
215
216 // Time when information or data were last generated.
220
222
226
227private:
229 void operator=(const vtkDemandDrivenPipeline&) = delete;
230};
231
232VTK_ABI_NAMESPACE_END
233#endif
Abstract superclass for all arrays.
general representation of visualization data
represent and manipulate attribute data in a dataset
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)
static vtkDataObject * NewDataObject(const char *type)
Create (New) and return a data object of the given type.
int InputTypeIsValid(vtkInformationVector **)
virtual int ExecuteData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
int ArrayIsValid(vtkAbstractArray *array, vtkInformation *field)
int InputFieldsAreValid(vtkInformationVector **)
virtual int CheckDataObject(int port, vtkInformationVector *outInfo)
static vtkDemandDrivenPipeline * New()
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)
int InputIsRepeatable(int port)
represent and manipulate fields of data
a simple class to control print indentation
Definition vtkIndent.h:29
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
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_OBJECT()
Key defining a request to make sure the output data objects exist.
static vtkInformationRequestKey * REQUEST_INFORMATION()
Key defining a request to make sure the output information is up to date.
static vtkInformationRequestKey * REQUEST_DATA()
Key defining a request to make sure the output data are up to date.
int vtkTypeBool
Definition vtkABI.h:64
#define vtkDataArray
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_MARSHALAUTO