VTK  9.2.6
vtkDemandDrivenPipeline.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDemandDrivenPipeline.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
39 #ifndef vtkDemandDrivenPipeline_h
40 #define vtkDemandDrivenPipeline_h
41 
42 #include "vtkCommonExecutionModelModule.h" // For export macro
43 #include "vtkExecutive.h"
44 
45 class vtkAbstractArray;
46 class vtkDataArray;
48 class vtkDemandDrivenPipelineInternals;
49 class vtkFieldData;
50 class vtkInformation;
55 
62 
63 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkDemandDrivenPipeline : public vtkExecutive
64 {
65 public:
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
75  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
76 
81  vtkInformationVector* outInfoVec, int requestFromOutputPort, vtkMTimeType* mtime) override;
82 
84 
88  vtkTypeBool Update() override;
89  vtkTypeBool Update(int port) override;
91 
93 
96  vtkGetMacro(PipelineMTime, vtkMTimeType);
98 
103  virtual int SetReleaseDataFlag(int port, int n);
104 
108  virtual int GetReleaseDataFlag(int port);
109 
113  virtual int UpdatePipelineMTime();
114 
120  int UpdateDataObject() override;
121 
125  int UpdateInformation() override;
126 
132  virtual int UpdateData(int outputPort);
133 
139 
145 
151 
158 
165 
173 
179  static vtkDataObject* NewDataObject(const char* type);
180 
181 protected:
184 
185  // Helper methods to send requests to the algorithm.
186  virtual int ExecuteDataObject(
187  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
188  virtual int ExecuteInformation(
189  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
190  virtual int ExecuteData(
191  vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
192 
193  // Reset the pipeline update values in the given output information object.
195 
196  // Check whether the data object in the pipeline information for an
197  // output port exists and has a valid type.
198  virtual int CheckDataObject(int port, vtkInformationVector* outInfo);
199 
200  // Input connection validity checkers.
209 
210  // Field existence checkers.
214 
215  // Input port information checkers.
218 
219  // Decide whether the output data need to be generated.
220  virtual int NeedToExecuteData(
221  int outputPort, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
222 
223  // Handle before/after operations for ExecuteData method.
224  virtual void ExecuteDataStart(
225  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
226  virtual void ExecuteDataEnd(
227  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
228  virtual void MarkOutputsGenerated(
229  vtkInformation* request, vtkInformationVector** inInfoVec, vtkInformationVector* outInfoVec);
230 
231  // Largest MTime of any algorithm on this executive or preceding
232  // executives.
234 
235  // Time when information or data were last generated.
239 
241 
245 
246 private:
248  void operator=(const vtkDemandDrivenPipeline&) = delete;
249 };
250 
251 #endif
Abstract superclass for all arrays.
Executive supporting composite datasets.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:65
general representation of visualization data
Definition: vtkDataObject.h:75
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 int GetReleaseDataFlag(int port)
Get whether the given output port releases data when it is consumed.
virtual void ExecuteDataStart(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
virtual int SetReleaseDataFlag(int port, int n)
Set whether the given output port releases data when it is consumed.
virtual void ExecuteDataEnd(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec)
vtkTypeBool Update() override
Bring the algorithm's outputs up-to-date.
int InputCountIsValid(vtkInformationVector **)
int FieldArrayExists(vtkFieldData *data, vtkInformation *field)
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:59
represent and manipulate fields of data
Definition: vtkFieldData.h:72
a simple class to control print indentation
Definition: vtkIndent.h:49
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:45
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:183
@ port
Definition: vtkX3D.h:453
@ type
Definition: vtkX3D.h:522
@ index
Definition: vtkX3D.h:252
@ data
Definition: vtkX3D.h:321
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287