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 "vtkDataObjectAlgorithm.h" 00045 00046 class VTK_GRAPHICS_EXPORT vtkProgrammableDataObjectSource : public vtkDataObjectAlgorithm 00047 { 00048 public: 00049 static vtkProgrammableDataObjectSource *New(); 00050 vtkTypeMacro(vtkProgrammableDataObjectSource,vtkDataObjectAlgorithm); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00060 typedef void (*ProgrammableMethodCallbackType)(void *arg); 00061 00064 void SetExecuteMethod(void (*f)(void *), void *arg); 00065 00067 void SetExecuteMethodArgDelete(void (*f)(void *)); 00068 00069 protected: 00070 vtkProgrammableDataObjectSource(); 00071 ~vtkProgrammableDataObjectSource(); 00072 00073 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00074 vtkInformationVector *); 00075 00076 ProgrammableMethodCallbackType ExecuteMethod; //function to invoke 00077 ProgrammableMethodCallbackType ExecuteMethodArgDelete; 00078 void *ExecuteMethodArg; 00079 private: 00080 vtkProgrammableDataObjectSource(const vtkProgrammableDataObjectSource&); // Not implemented. 00081 void operator=(const vtkProgrammableDataObjectSource&); // Not implemented. 00082 }; 00083 00084 #endif