00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkProgrammableAttributeDataFilter.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 =========================================================================*/ 00079 #ifndef __vtkProgrammableAttributeDataFilter_h 00080 #define __vtkProgrammableAttributeDataFilter_h 00081 00082 #include "vtkDataSetAlgorithm.h" 00083 00084 class vtkDataSetCollection; 00085 00086 class VTK_GRAPHICS_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetAlgorithm 00087 { 00088 public: 00089 static vtkProgrammableAttributeDataFilter *New(); 00090 vtkTypeRevisionMacro(vtkProgrammableAttributeDataFilter,vtkDataSetAlgorithm); 00091 void PrintSelf(ostream& os, vtkIndent indent); 00092 00094 void AddInput(vtkDataSet *in); 00095 00097 void RemoveInput(vtkDataSet *in); 00098 00100 vtkDataSetCollection *GetInputList() {return this->InputList;}; 00101 00104 void SetExecuteMethod(void (*f)(void *), void *arg); 00105 00107 void SetExecuteMethodArgDelete(void (*f)(void *)); 00108 00109 protected: 00110 vtkProgrammableAttributeDataFilter(); 00111 ~vtkProgrammableAttributeDataFilter(); 00112 00113 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00114 vtkDataSetCollection *InputList; //list of datasets to process 00115 void (*ExecuteMethod)(void *); //function to invoke 00116 void (*ExecuteMethodArgDelete)(void *); 00117 void *ExecuteMethodArg; 00118 00119 virtual void ReportReferences(vtkGarbageCollector*); 00120 00121 private: 00122 // hide the superclass' AddInput() from the user and the compiler 00123 void AddInput(vtkDataObject *) 00124 { vtkErrorMacro( << "AddInput() must be called with a vtkDataSet not a vtkDataObject."); }; 00125 00126 private: 00127 vtkProgrammableAttributeDataFilter(const vtkProgrammableAttributeDataFilter&); // Not implemented. 00128 void operator=(const vtkProgrammableAttributeDataFilter&); // Not implemented. 00129 }; 00130 00131 #endif 00132 00133