VTK  9.1.0
vtkProgrammableSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkProgrammableSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
38 #ifndef vtkProgrammableSource_h
39 #define vtkProgrammableSource_h
40 
41 #include "vtkDataObjectAlgorithm.h"
42 #include "vtkFiltersSourcesModule.h" // For export macro
43 
44 class vtkGraph;
45 class vtkMolecule;
46 class vtkPolyData;
47 class vtkRectilinearGrid;
48 class vtkStructuredGrid;
50 class vtkTable;
52 
53 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataObjectAlgorithm
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
69  typedef void (*ProgrammableMethodCallbackType)(void* arg);
70 
75  void SetExecuteMethod(void (*f)(void*), void* arg);
76 
80  void SetExecuteMethodArgDelete(void (*f)(void*));
81 
85  void SetRequestInformationMethod(void (*f)(void*));
86 
88 
103 
104 protected:
107 
111 
112  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
113  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
115  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
116 
119 
120 private:
122  void operator=(const vtkProgrammableSource&) = delete;
123 };
124 
125 #endif
Superclass for algorithms that produce only data object as output.
Base class for graph data types.
Definition: vtkGraph.h:290
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
class describing a molecule
Definition: vtkMolecule.h:92
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
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:63
record modification and/or execution time
Definition: vtkTimeStamp.h:33
dataset represents arbitrary combinations of all possible cell types