Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Graphics/vtkProgrammableDataObjectSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProgrammableDataObjectSource.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00055 #ifndef __vtkProgrammableDataObjectSource_h
00056 #define __vtkProgrammableDataObjectSource_h
00057 
00058 #include "vtkSource.h"
00059 
00060 class VTK_GRAPHICS_EXPORT vtkProgrammableDataObjectSource : public vtkSource
00061 {
00062 public:
00063   static vtkProgrammableDataObjectSource *New();
00064   vtkTypeRevisionMacro(vtkProgrammableDataObjectSource,vtkSource);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066 
00069   void SetExecuteMethod(void (*f)(void *), void *arg);
00070 
00072   void SetExecuteMethodArgDelete(void (*f)(void *));
00073 
00075 
00076   vtkDataObject *GetOutput();
00077   vtkDataObject *GetOutput(int idx)
00078     {return (vtkDataObject *) this->vtkSource::GetOutput(idx); };
00080 
00081 protected:
00082   vtkProgrammableDataObjectSource();
00083   ~vtkProgrammableDataObjectSource();
00084 
00085   void Execute();
00086 
00087   void (*ExecuteMethod)(void *); //function to invoke
00088   void (*ExecuteMethodArgDelete)(void *);
00089   void *ExecuteMethodArg;
00090 private:
00091   vtkProgrammableDataObjectSource(const vtkProgrammableDataObjectSource&);  // Not implemented.
00092   void operator=(const vtkProgrammableDataObjectSource&);  // Not implemented.
00093 };
00094 
00095 #endif
00096