VTK  9.3.20240419
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
48 #ifndef vtkProgrammableSource_h
49 #define vtkProgrammableSource_h
50 
51 #include "vtkDataObjectAlgorithm.h"
52 #include "vtkFiltersSourcesModule.h" // For export macro
53 
54 VTK_ABI_NAMESPACE_BEGIN
55 class vtkGraph;
56 class vtkMolecule;
57 class vtkPolyData;
58 class vtkRectilinearGrid;
59 class vtkStructuredGrid;
61 class vtkTable;
63 
64 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataObjectAlgorithm
65 {
66 public:
69  void PrintSelf(ostream& os, vtkIndent indent) override;
70 
80  typedef void (*ProgrammableMethodCallbackType)(void* arg);
81 
86  void SetExecuteMethod(void (*f)(void*), void* arg);
87 
91  void SetExecuteMethodArgDelete(void (*f)(void*));
92 
96  void SetRequestInformationMethod(void (*f)(void*));
97 
99 
114 
115 protected:
118 
122 
123  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
124  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
126  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
127 
130 
131 private:
133  void operator=(const vtkProgrammableSource&) = delete;
134 };
135 
136 VTK_ABI_NAMESPACE_END
137 #endif
Superclass for algorithms that produce only data object as output.
Base class for graph data types.
Definition: vtkGraph.h:340
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
class describing a molecule
Definition: vtkMolecule.h:84
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:181
generate source dataset via a user-specified function
ProgrammableMethodCallbackType RequestInformationMethod
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkPolyData * GetPolyDataOutput()
Get the output as a concrete type.
~vtkProgrammableSource() override
static vtkProgrammableSource * New()
vtkStructuredGrid * GetStructuredGridOutput()
Get the output as a concrete type.
void SetExecuteMethod(void(*f)(void *), void *arg)
Specify the function to use to generate the source data.
ProgrammableMethodCallbackType ExecuteMethod
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as a concrete type.
vtkMolecule * GetMoleculeOutput()
Get the output as a concrete type.
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
vtkStructuredPoints * GetStructuredPointsOutput()
Get the output as a concrete type.
vtkTable * GetTableOutput()
Get the output as a concrete type.
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as a concrete type.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkGraph * GetGraphOutput()
Get the output as a concrete type.
void SetRequestInformationMethod(void(*f)(void *))
Specify the function to use to fill in information about the source data.
ProgrammableMethodCallbackType ExecuteMethodArgDelete
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a dataset that is topologically regular with variable spacing in the three coordinate directions
topologically regular array of data
A subclass of ImageData.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:168
record modification and/or execution time
Definition: vtkTimeStamp.h:44
dataset represents arbitrary combinations of all possible cell types