VTK  9.2.6
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 =========================================================================*/
41 #ifndef vtkProgrammableSource_h
42 #define vtkProgrammableSource_h
43 
44 #include "vtkDataObjectAlgorithm.h"
45 #include "vtkFiltersSourcesModule.h" // For export macro
46 
47 class vtkGraph;
48 class vtkMolecule;
49 class vtkPolyData;
50 class vtkRectilinearGrid;
51 class vtkStructuredGrid;
53 class vtkTable;
55 
56 class VTKFILTERSSOURCES_EXPORT vtkProgrammableSource : public vtkDataObjectAlgorithm
57 {
58 public:
59  static vtkProgrammableSource* New();
61  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
72  typedef void (*ProgrammableMethodCallbackType)(void* arg);
73 
78  void SetExecuteMethod(void (*f)(void*), void* arg);
79 
83  void SetExecuteMethodArgDelete(void (*f)(void*));
84 
88  void SetRequestInformationMethod(void (*f)(void*));
89 
91 
97  vtkPolyData* GetPolyDataOutput();
98  vtkStructuredPoints* GetStructuredPointsOutput();
99  vtkStructuredGrid* GetStructuredGridOutput();
100  vtkUnstructuredGrid* GetUnstructuredGridOutput();
101  vtkRectilinearGrid* GetRectilinearGridOutput();
102  vtkGraph* GetGraphOutput();
103  vtkMolecule* GetMoleculeOutput();
104  vtkTable* GetTableOutput();
106 
107 protected:
109  ~vtkProgrammableSource() override;
110 
114 
115  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
116  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
118  ProgrammableMethodCallbackType RequestInformationMethod; // function to invoke
119 
122 
123 private:
125  void operator=(const vtkProgrammableSource&) = delete;
126 };
127 
128 #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:94
static vtkDataObjectAlgorithm * New()
ProgrammableMethodCallbackType ExecuteMethod
record modification and/or execution time
Definition: vtkTimeStamp.h:35
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
ProgrammableMethodCallbackType RequestInformationMethod
Base class for graph data types.
Definition: vtkGraph.h:295
a simple class to control print indentation
Definition: vtkIndent.h:39
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:73
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.