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

Graphics/vtkProgrammableAttributeDataFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProgrammableAttributeDataFilter.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 =========================================================================*/
00095 #ifndef __vtkProgrammableAttributeDataFilter_h
00096 #define __vtkProgrammableAttributeDataFilter_h
00097 
00098 #include "vtkDataSetToDataSetFilter.h"
00099 
00100 class vtkDataSetCollection;
00101 
00102 class VTK_GRAPHICS_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetToDataSetFilter 
00103 {
00104 public:
00105   static vtkProgrammableAttributeDataFilter *New();
00106   vtkTypeRevisionMacro(vtkProgrammableAttributeDataFilter,vtkDataSetToDataSetFilter);
00107   void PrintSelf(ostream& os, vtkIndent indent);
00108 
00110   void AddInput(vtkDataSet *in);
00111 
00113   void RemoveInput(vtkDataSet *in);
00114 
00116   vtkDataSetCollection *GetInputList() {return this->InputList;};
00117 
00120   void SetExecuteMethod(void (*f)(void *), void *arg);
00121 
00123   void SetExecuteMethodArgDelete(void (*f)(void *));
00124 
00125 protected:
00126   vtkProgrammableAttributeDataFilter();
00127   ~vtkProgrammableAttributeDataFilter();
00128 
00129   void Execute();
00130   vtkDataSetCollection *InputList; //list of datasets to process
00131   void (*ExecuteMethod)(void *); //function to invoke
00132   void (*ExecuteMethodArgDelete)(void *);
00133   void *ExecuteMethodArg;
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