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

vtkProcessObject.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkProcessObject.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 =========================================================================*/
00055 #ifndef __vtkProcessObject_h
00056 #define __vtkProcessObject_h
00057 
00058 #include "vtkAlgorithm.h"
00059 
00060 class vtkDataObject;
00061 
00062 class VTK_FILTERING_EXPORT vtkProcessObject : public vtkAlgorithm
00063 {
00064 public:
00065   vtkTypeRevisionMacro(vtkProcessObject,vtkAlgorithm);
00066   void PrintSelf(ostream& os, vtkIndent indent);
00067 
00069 
00071   vtkDataObject **GetInputs();
00072   int GetNumberOfInputs();
00074 
00077   void SqueezeInputArray();
00078   
00080   void RemoveAllInputs();
00081 
00083 
00085   vtkGetMacro( ErrorCode, unsigned long );
00087 
00089 
00091   virtual void SetInputConnection(int port, vtkAlgorithmOutput* input);
00092   virtual void AddInputConnection(int port, vtkAlgorithmOutput* input);
00093   virtual void RemoveInputConnection(int port, vtkAlgorithmOutput* input);
00095 protected:
00096   vtkProcessObject();
00097   ~vtkProcessObject();
00098 
00099   int NumberOfInputs;
00100   int NumberOfRequiredInputs;
00101   vtkDataObject **Inputs;     //An array of the inputs to the filter
00102 
00103   // Called to allocate the input array.  Copies old inputs.
00104   void SetNumberOfInputs(int num);
00105 
00106   // protected methods for setting inputs.
00107   virtual void SetNthInput(int num, vtkDataObject *input);
00108   virtual void AddInput(vtkDataObject *input);
00109   virtual void RemoveInput(vtkDataObject *input);
00110 
00111   virtual void ReportReferences(vtkGarbageCollector*);
00112   virtual void RemoveReferences();
00113 
00114   // Implement methods required by vtkAlgorithm.
00115   virtual int FillInputPortInformation(int, vtkInformation*);
00116   virtual int FillOutputPortInformation(int, vtkInformation*);
00117 
00118   // Helper methods for compatibility layer.
00119   void AddInputInternal(vtkDataObject* input);
00120   void RemoveInputInternal(vtkDataObject* input);
00121   void SetupInputs();
00122 
00124 
00126   vtkSetMacro( ErrorCode, unsigned long );
00127   unsigned long ErrorCode;
00129 
00130 private:
00131   vtkProcessObject(const vtkProcessObject&);  // Not implemented.
00132   void operator=(const vtkProcessObject&);  // Not implemented.
00133 };
00134 
00135 #endif
00136