Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkProgrammableSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProgrammableSource.h,v $
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 =========================================================================*/
00059 #ifndef __vtkProgrammableSource_h
00060 #define __vtkProgrammableSource_h
00061 
00062 #include "vtkSource.h"
00063 
00064 class vtkPolyData;
00065 class vtkStructuredPoints;
00066 class vtkStructuredGrid;
00067 class vtkUnstructuredGrid;
00068 class vtkRectilinearGrid;
00069 
00070 class VTK_GRAPHICS_EXPORT vtkProgrammableSource : public vtkSource
00071 {
00072 public:
00073   static vtkProgrammableSource *New();
00074   vtkTypeRevisionMacro(vtkProgrammableSource,vtkSource);
00075 
00078   void SetExecuteMethod(void (*f)(void *), void *arg);
00079 
00081   void SetExecuteMethodArgDelete(void (*f)(void *));
00082 
00087   vtkPolyData *GetPolyDataOutput();
00088 
00090   vtkStructuredPoints *GetStructuredPointsOutput();
00091 
00093   vtkStructuredGrid *GetStructuredGridOutput();
00094 
00096   vtkUnstructuredGrid *GetUnstructuredGridOutput();
00097 
00099   vtkRectilinearGrid *GetRectilinearGridOutput();
00100 
00101   void UpdateInformation();
00102   void UpdateData(vtkDataObject *output);
00103 
00104 protected:
00105   vtkProgrammableSource();
00106   ~vtkProgrammableSource();
00107 
00108   void Execute();
00109 
00110   void (*ExecuteMethod)(void *); //function to invoke
00111   void (*ExecuteMethodArgDelete)(void *);
00112   void *ExecuteMethodArg;  
00113 
00114   vtkTimeStamp ExecuteTime;
00115 private:
00116   vtkProgrammableSource(const vtkProgrammableSource&);  // Not implemented.
00117   void operator=(const vtkProgrammableSource&);  // Not implemented.
00118 };
00119 
00120 #endif
00121