VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
35 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkGraph;
38 class vtkMolecule;
39 class vtkPolyData;
40 class vtkRectilinearGrid;
41 class vtkStructuredGrid;
43 class vtkTable;
45 
46 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkProgrammableSource : public vtkDataObjectAlgorithm
47 {
48 public:
49  static vtkProgrammableSource* New();
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
62  typedef void (*ProgrammableMethodCallbackType)(void* arg);
63 
68  void SetExecuteMethod(void (*f)(void*), void* arg);
69 
73  void SetExecuteMethodArgDelete(void (*f)(void*));
74 
78  void SetRequestInformationMethod(void (*f)(void*));
79 
81 
87  vtkPolyData* GetPolyDataOutput();
88  vtkStructuredPoints* GetStructuredPointsOutput();
89  vtkStructuredGrid* GetStructuredGridOutput();
90  vtkUnstructuredGrid* GetUnstructuredGridOutput();
91  vtkRectilinearGrid* GetRectilinearGridOutput();
92  vtkGraph* GetGraphOutput();
93  vtkMolecule* GetMoleculeOutput();
94  vtkTable* GetTableOutput();
96 
97 protected:
99  ~vtkProgrammableSource() override;
100 
104 
105  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
106  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
108  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
109 
112 
113 private:
115  void operator=(const vtkProgrammableSource&) = delete;
116 };
117 
118 VTK_ABI_NAMESPACE_END
119 #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:71
ProgrammableMethodCallbackType RequestInformationMethod
Base class for graph data types.
Definition: vtkGraph.h:282
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:59
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.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.