VTK  9.3.20240419
vtkProgrammableDataObjectSource.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
27 #ifndef vtkProgrammableDataObjectSource_h
28 #define vtkProgrammableDataObjectSource_h
29 
30 #include "vtkDataObjectAlgorithm.h"
31 #include "vtkFiltersSourcesModule.h" // For export macro
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class VTKFILTERSSOURCES_EXPORT vtkProgrammableDataObjectSource : public vtkDataObjectAlgorithm
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
50  typedef void (*ProgrammableMethodCallbackType)(void* arg);
51 
56  void SetExecuteMethod(void (*f)(void*), void* arg);
57 
61  void SetExecuteMethodArgDelete(void (*f)(void*));
62 
63 protected:
66 
68 
69  ProgrammableMethodCallbackType ExecuteMethod; // function to invoke
70  ProgrammableMethodCallbackType ExecuteMethodArgDelete;
72 
73 private:
75  void operator=(const vtkProgrammableDataObjectSource&) = delete;
76 };
77 
78 VTK_ABI_NAMESPACE_END
79 #endif
Superclass for algorithms that produce only data object as output.
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
generate source data object via a user-specified function
ProgrammableMethodCallbackType ExecuteMethod
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
void SetExecuteMethod(void(*f)(void *), void *arg)
Specify the function to use to generate the output data object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetExecuteMethodArgDelete(void(*f)(void *))
Set the arg delete method.
ProgrammableMethodCallbackType ExecuteMethodArgDelete
static vtkProgrammableDataObjectSource * New()