VTK  9.5.20251025
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
52#include "vtkFiltersSourcesModule.h" // For export macro
53#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
54
55VTK_ABI_NAMESPACE_BEGIN
56class vtkGraph;
57class vtkMolecule;
58class vtkPolyData;
62class vtkTable;
64
65class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkProgrammableSource : public vtkDataObjectAlgorithm
66{
67public:
70 void PrintSelf(ostream& os, vtkIndent indent) override;
71
81 typedef void (*ProgrammableMethodCallbackType)(void* arg);
82
87 void SetExecuteMethod(void (*f)(void*), void* arg);
88
92 void SetExecuteMethodArgDelete(void (*f)(void*));
93
97 void SetRequestInformationMethod(void (*f)(void*));
98
100
115
116protected:
119
123
124 ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
125 ProgrammableMethodCallbackType ExecuteMethodArgDelete;
127 ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
128
131
132private:
134 void operator=(const vtkProgrammableSource&) = delete;
135};
136
137VTK_ABI_NAMESPACE_END
138#endif
Superclass for algorithms that produce only data object as output.
Base class for graph data types.
Definition vtkGraph.h:342
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
generate source dataset via a user-specified function
ProgrammableMethodCallbackType RequestInformationMethod
vtkTable * GetTableOutput()
Get the output as a concrete type.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkGraph * GetGraphOutput()
Get the output as a concrete type.
vtkRectilinearGrid * GetRectilinearGridOutput()
Get the output as a concrete type.
vtkPolyData * GetPolyDataOutput()
Get the output as a concrete type.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
~vtkProgrammableSource() override
void SetExecuteMethod(void(*f)(void *), void *arg)
Specify the function to use to generate the source data.
ProgrammableMethodCallbackType ExecuteMethod
vtkMolecule * GetMoleculeOutput()
Get the output as a concrete type.
static vtkProgrammableSource * New()
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
vtkStructuredPoints * GetStructuredPointsOutput()
Get the output as a concrete type.
vtkStructuredGrid * GetStructuredGridOutput()
Get the output as a concrete type.
int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetRequestInformationMethod(void(*f)(void *))
Specify the function to use to fill in information about the source data.
ProgrammableMethodCallbackType ExecuteMethodArgDelete
vtkUnstructuredGrid * GetUnstructuredGridOutput()
Get the output as a concrete type.
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:169
record modification and/or execution time
dataset represents arbitrary combinations of all possible cell types
#define VTK_MARSHALAUTO