Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class 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 =========================================================================*/
00083 #ifndef __vtkProgrammableAttributeDataFilter_h
00084 #define __vtkProgrammableAttributeDataFilter_h
00085 
00086 #include "vtkDataSetToDataSetFilter.h"
00087 
00088 class vtkDataSetCollection;
00089 
00090 class VTK_GRAPHICS_EXPORT vtkProgrammableAttributeDataFilter : public vtkDataSetToDataSetFilter 
00091 {
00092 public:
00093   static vtkProgrammableAttributeDataFilter *New();
00094   vtkTypeRevisionMacro(vtkProgrammableAttributeDataFilter,vtkDataSetToDataSetFilter);
00095   void PrintSelf(ostream& os, vtkIndent indent);
00096 
00098   void AddInput(vtkDataSet *in);
00099 
00101   void RemoveInput(vtkDataSet *in);
00102 
00104   vtkDataSetCollection *GetInputList() {return this->InputList;};
00105 
00108   void SetExecuteMethod(void (*f)(void *), void *arg);
00109 
00111   void SetExecuteMethodArgDelete(void (*f)(void *));
00112 
00113 protected:
00114   vtkProgrammableAttributeDataFilter();
00115   ~vtkProgrammableAttributeDataFilter();
00116 
00117   void Execute();
00118   vtkDataSetCollection *InputList; //list of datasets to process
00119   void (*ExecuteMethod)(void *); //function to invoke
00120   void (*ExecuteMethodArgDelete)(void *);
00121   void *ExecuteMethodArg;
00122 
00123 private:
00124   // hide the superclass' AddInput() from the user and the compiler
00125   void AddInput(vtkDataObject *)
00126     { vtkErrorMacro( << "AddInput() must be called with a vtkDataSet not a vtkDataObject."); };
00127   void RemoveInput(vtkDataObject *input)
00128     { this->vtkProcessObject::RemoveInput(input); };
00129 private:
00130   vtkProgrammableAttributeDataFilter(const vtkProgrammableAttributeDataFilter&);  // Not implemented.
00131   void operator=(const vtkProgrammableAttributeDataFilter&);  // Not implemented.
00132 };
00133 
00134 #endif
00135 
00136