VTK  9.3.0
vtkProgrammableAttributeDataFilter.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
68 #ifndef vtkProgrammableAttributeDataFilter_h
69 #define vtkProgrammableAttributeDataFilter_h
70 
71 #include "vtkDataSetAlgorithm.h"
72 #include "vtkFiltersProgrammableModule.h" // For export macro
73 
74 VTK_ABI_NAMESPACE_BEGIN
76 
77 class VTKFILTERSPROGRAMMABLE_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetAlgorithm
78 {
79 public:
82  void PrintSelf(ostream& os, vtkIndent indent) override;
83 
87  void AddInput(vtkDataSet* in);
88 
93 
97  vtkDataSetCollection* GetInputList() { return this->InputList; }
98 
108  typedef void (*ProgrammableMethodCallbackType)(void* arg);
109 
114  void SetExecuteMethod(void (*f)(void*), void* arg);
115 
119  void SetExecuteMethodArgDelete(void (*f)(void*));
120 
121 protected:
124 
126  vtkDataSetCollection* InputList; // list of datasets to process
127  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
128  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
130 
132 
133 private:
134  // hide the superclass' AddInput() from the user and the compiler
135  void AddInput(vtkDataObject*)
136  {
137  vtkErrorMacro(<< "AddInput() must be called with a vtkDataSet not a vtkDataObject.");
138  }
139 
141  void operator=(const vtkProgrammableAttributeDataFilter&) = delete;
142 };
143 
144 VTK_ABI_NAMESPACE_END
145 #endif
general representation of visualization data
Definition: vtkDataObject.h:64
Superclass for algorithms that produce output of the same type as input.
maintain an unordered list of dataset objects
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
manipulate attribute (cell and point) data via a user-specified function
vtkDataSetCollection * GetInputList()
Return the list of inputs.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkProgrammableAttributeDataFilter * New()
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
void SetExecuteMethod(void(*f)(void *), void *arg)
Specify the function to use to operate on the point attribute data.
void ReportReferences(vtkGarbageCollector *) override
void RemoveInput(vtkDataSet *in)
Remove a dataset from the list of data to process.
void AddInput(vtkDataSet *in)
Add a dataset to the list of data to process.