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

vtkProgrammableDataObjectSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProgrammableDataObjectSource.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 =========================================================================*/
00051 #ifndef __vtkProgrammableDataObjectSource_h
00052 #define __vtkProgrammableDataObjectSource_h
00053 
00054 #include "vtkSource.h"
00055 
00056 class VTK_GRAPHICS_EXPORT vtkProgrammableDataObjectSource : public vtkSource
00057 {
00058 public:
00059   static vtkProgrammableDataObjectSource *New();
00060   vtkTypeRevisionMacro(vtkProgrammableDataObjectSource,vtkSource);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00065   void SetExecuteMethod(void (*f)(void *), void *arg);
00066 
00068   void SetExecuteMethodArgDelete(void (*f)(void *));
00069 
00071 
00072   vtkDataObject *GetOutput();
00073   vtkDataObject *GetOutput(int idx)
00074     {return (vtkDataObject *) this->vtkSource::GetOutput(idx); };
00076 
00077 protected:
00078   vtkProgrammableDataObjectSource();
00079   ~vtkProgrammableDataObjectSource();
00080 
00081   void Execute();
00082 
00083   void (*ExecuteMethod)(void *); //function to invoke
00084   void (*ExecuteMethodArgDelete)(void *);
00085   void *ExecuteMethodArg;
00086 private:
00087   vtkProgrammableDataObjectSource(const vtkProgrammableDataObjectSource&);  // Not implemented.
00088   void operator=(const vtkProgrammableDataObjectSource&);  // Not implemented.
00089 };
00090 
00091 #endif
00092