VTK  9.7.1
vtkUnstructuredGridAlgorithm.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
22 #ifndef vtkUnstructuredGridAlgorithm_h
23 #define vtkUnstructuredGridAlgorithm_h
24 
25 #include "vtkAlgorithm.h"
26 #include "vtkCommonExecutionModelModule.h" // For export macro
27 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkDataSet;
32 
33 class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALAUTO vtkUnstructuredGridAlgorithm
34  : public vtkAlgorithm
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
45  vtkUnstructuredGrid* GetOutput();
46  vtkUnstructuredGrid* GetOutput(int);
47  virtual void SetOutput(vtkDataObject* d);
49 
55 
56  // this method is not recommended for use, but lots of old style filters
57  // use it
58  vtkDataObject* GetInput(int port);
59  vtkDataObject* GetInput() { return this->GetInput(0); }
60  vtkUnstructuredGrid* GetUnstructuredGridInput(int port);
61 
63 
68  void SetInputData(vtkDataObject*);
69  void SetInputData(int, vtkDataObject*);
71 
73 
78  void AddInputData(vtkDataObject*);
79  void AddInputData(int, vtkDataObject*);
81 
82 protected:
84  ~vtkUnstructuredGridAlgorithm() override;
85 
86  // convenience method
87  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
88  vtkInformationVector* outputVector);
89 
94  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
95  vtkInformationVector* outputVector);
96 
97  virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
98  vtkInformationVector* outputVector);
99 
104  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
105 
106  virtual int RequestUpdateTime(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
107 
108  // see algorithm for more info
110  int FillInputPortInformation(int port, vtkInformation* info) override;
111 
112 private:
114  void operator=(const vtkUnstructuredGridAlgorithm&) = delete;
115 };
116 
117 VTK_ABI_NAMESPACE_END
118 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:64
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
dataset represents arbitrary combinations of all possible cell types
#define vtkUnstructuredGridAlgorithm
Definition: vtkmCleanGrid.h:24
Superclass for algorithms that produce only unstructured grid as output.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_MARSHALAUTO
general representation of visualization data
Definition: vtkDataObject.h:55