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 =========================================================================*/ 00092 #ifndef __vtkProgrammableAttributeDataFilter_h 00093 #define __vtkProgrammableAttributeDataFilter_h 00094 00095 #include "vtkDataSetToDataSetFilter.h" 00096 00097 class vtkDataSetCollection; 00098 00099 class VTK_GRAPHICS_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetToDataSetFilter 00100 { 00101 public: 00102 static vtkProgrammableAttributeDataFilter *New(); 00103 vtkTypeRevisionMacro(vtkProgrammableAttributeDataFilter,vtkDataSetToDataSetFilter); 00104 void PrintSelf(ostream& os, vtkIndent indent); 00105 00107 void AddInput(vtkDataSet *in); 00108 00110 void RemoveInput(vtkDataSet *in); 00111 00113 vtkDataSetCollection *GetInputList() {return this->InputList;}; 00114 00117 void SetExecuteMethod(void (*f)(void *), void *arg); 00118 00120 void SetExecuteMethodArgDelete(void (*f)(void *)); 00121 00122 protected: 00123 vtkProgrammableAttributeDataFilter(); 00124 ~vtkProgrammableAttributeDataFilter(); 00125 00126 void Execute(); 00127 vtkDataSetCollection *InputList; //list of datasets to process 00128 void (*ExecuteMethod)(void *); //function to invoke 00129 void (*ExecuteMethodArgDelete)(void *); 00130 void *ExecuteMethodArg; 00131 00132 virtual void ReportReferences(vtkGarbageCollector*); 00133 virtual void RemoveReferences(); 00134 00135 private: 00136 // hide the superclass' AddInput() from the user and the compiler 00137 void AddInput(vtkDataObject *) 00138 { vtkErrorMacro( << "AddInput() must be called with a vtkDataSet not a vtkDataObject."); }; 00139 void RemoveInput(vtkDataObject *input) 00140 { this->vtkProcessObject::RemoveInput(input); }; 00141 private: 00142 vtkProgrammableAttributeDataFilter(const vtkProgrammableAttributeDataFilter&); // Not implemented. 00143 void operator=(const vtkProgrammableAttributeDataFilter&); // Not implemented. 00144 }; 00145 00146 #endif 00147 00148