VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkProgrammableDataObjectSource.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00041 #ifndef vtkProgrammableDataObjectSource_h 00042 #define vtkProgrammableDataObjectSource_h 00043 00044 #include "vtkFiltersSourcesModule.h" // For export macro 00045 #include "vtkDataObjectAlgorithm.h" 00046 00047 class VTKFILTERSSOURCES_EXPORT vtkProgrammableDataObjectSource : public vtkDataObjectAlgorithm 00048 { 00049 public: 00050 static vtkProgrammableDataObjectSource *New(); 00051 vtkTypeMacro(vtkProgrammableDataObjectSource,vtkDataObjectAlgorithm); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00061 typedef void (*ProgrammableMethodCallbackType)(void *arg); 00062 00065 void SetExecuteMethod(void (*f)(void *), void *arg); 00066 00068 void SetExecuteMethodArgDelete(void (*f)(void *)); 00069 00070 protected: 00071 vtkProgrammableDataObjectSource(); 00072 ~vtkProgrammableDataObjectSource(); 00073 00074 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00075 vtkInformationVector *); 00076 00077 ProgrammableMethodCallbackType ExecuteMethod; //function to invoke 00078 ProgrammableMethodCallbackType ExecuteMethodArgDelete; 00079 void *ExecuteMethodArg; 00080 private: 00081 vtkProgrammableDataObjectSource(const vtkProgrammableDataObjectSource&); // Not implemented. 00082 void operator=(const vtkProgrammableDataObjectSource&); // Not implemented. 00083 }; 00084 00085 #endif