VTK  9.3.1
vtkPassArrays.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-NVIDIA-USGov
58 #ifndef vtkPassArrays_h
59 #define vtkPassArrays_h
60 
61 #include "vtkDataObjectAlgorithm.h"
62 #include "vtkFiltersGeneralModule.h" // For export macro
63 
64 VTK_ABI_NAMESPACE_BEGIN
65 class VTKFILTERSGENERAL_EXPORT vtkPassArrays : public vtkDataObjectAlgorithm
66 {
67 public:
68  static vtkPassArrays* New();
70  void PrintSelf(ostream& os, vtkIndent indent) override;
71 
78  virtual void AddArray(int fieldType, const char* name);
79 
80  virtual void AddPointDataArray(const char* name);
81  virtual void AddCellDataArray(const char* name);
82  virtual void AddFieldDataArray(const char* name);
83 
84  virtual void RemoveArray(int fieldType, const char* name);
85 
86  virtual void RemovePointDataArray(const char* name);
87  virtual void RemoveCellDataArray(const char* name);
88  virtual void RemoveFieldDataArray(const char* name);
89 
91 
94  virtual void ClearArrays();
95  virtual void ClearPointDataArrays();
96  virtual void ClearCellDataArrays();
97  virtual void ClearFieldDataArrays();
99 
101 
105  vtkSetMacro(RemoveArrays, bool);
106  vtkGetMacro(RemoveArrays, bool);
107  vtkBooleanMacro(RemoveArrays, bool);
109 
111 
116  vtkSetMacro(UseFieldTypes, bool);
117  vtkGetMacro(UseFieldTypes, bool);
118  vtkBooleanMacro(UseFieldTypes, bool);
120 
128  virtual void AddFieldType(int fieldType);
129 
133  virtual void ClearFieldTypes();
134 
139  vtkInformationVector* outputVector) override;
140 
141 protected:
142  vtkPassArrays();
143  ~vtkPassArrays() override;
144 
149  int FillInputPortInformation(int port, vtkInformation* info) override;
150 
154  int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
155  vtkInformationVector* outputVector) override;
156 
158 
161 
162  class Internals;
163  Internals* Implementation;
164 
165 private:
166  vtkPassArrays(const vtkPassArrays&) = delete;
167  void operator=(const vtkPassArrays&) = delete;
168 };
169 
170 VTK_ABI_NAMESPACE_END
171 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Store vtkAlgorithm input/output information.
static vtkDataObjectAlgorithm * New()
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
int vtkTypeBool
Definition: vtkABI.h:64
Passes a subset of arrays to the output.
Definition: vtkPassArrays.h:65
a simple class to control print indentation
Definition: vtkIndent.h:28
Superclass for algorithms that produce only data object as output.
Internals * Implementation
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Store zero or more vtkInformation instances.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.