VTK  9.3.1
vtkProgrammableSource.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
29 #ifndef vtkProgrammableSource_h
30 #define vtkProgrammableSource_h
31 
32 #include "vtkDataObjectAlgorithm.h"
33 #include "vtkFiltersSourcesModule.h" // For export macro
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkGraph;
37 class vtkMolecule;
38 class vtkPolyData;
39 class vtkRectilinearGrid;
40 class vtkStructuredGrid;
42 class vtkTable;
44 
45 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataObjectAlgorithm
46 {
47 public:
48  static vtkProgrammableSource* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
61  typedef void (*ProgrammableMethodCallbackType)(void* arg);
62 
67  void SetExecuteMethod(void (*f)(void*), void* arg);
68 
72  void SetExecuteMethodArgDelete(void (*f)(void*));
73 
77  void SetRequestInformationMethod(void (*f)(void*));
78 
80 
86  vtkPolyData* GetPolyDataOutput();
87  vtkStructuredPoints* GetStructuredPointsOutput();
88  vtkStructuredGrid* GetStructuredGridOutput();
89  vtkUnstructuredGrid* GetUnstructuredGridOutput();
90  vtkRectilinearGrid* GetRectilinearGridOutput();
91  vtkGraph* GetGraphOutput();
92  vtkMolecule* GetMoleculeOutput();
93  vtkTable* GetTableOutput();
95 
96 protected:
98  ~vtkProgrammableSource() override;
99 
103 
104  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
105  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
107  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
108 
111 
112 private:
114  void operator=(const vtkProgrammableSource&) = delete;
115 };
116 
117 VTK_ABI_NAMESPACE_END
118 #endif
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
ProgrammableMethodCallbackType ExecuteMethodArgDelete
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
Store vtkAlgorithm input/output information.
class describing a molecule
Definition: vtkMolecule.h:83
static vtkDataObjectAlgorithm * New()
ProgrammableMethodCallbackType ExecuteMethod
record modification and/or execution time
Definition: vtkTimeStamp.h:24
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
ProgrammableMethodCallbackType RequestInformationMethod
Base class for graph data types.
Definition: vtkGraph.h:280
a simple class to control print indentation
Definition: vtkIndent.h:28
dataset represents arbitrary combinations of all possible cell types
generate source dataset via a user-specified function
Superclass for algorithms that produce only data object as output.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:58
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
A subclass of ImageData.
topologically regular array of data
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.