00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkExecutive.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 =========================================================================*/ 00037 #ifndef __vtkExecutive_h 00038 #define __vtkExecutive_h 00039 00040 #include "vtkObject.h" 00041 00042 class vtkAlgorithm; 00043 class vtkAlgorithmOutput; 00044 class vtkAlgorithmToExecutiveFriendship; 00045 class vtkDataObject; 00046 class vtkInformation; 00047 class vtkInformationExecutiveKey; 00048 class vtkInformationIntegerKey; 00049 00050 class VTK_FILTERING_EXPORT vtkExecutive : public vtkObject 00051 { 00052 public: 00053 vtkTypeRevisionMacro(vtkExecutive,vtkObject); 00054 void PrintSelf(ostream& os, vtkIndent indent); 00055 00059 virtual int Update(vtkAlgorithm* algorithm)=0; 00060 00064 virtual int Update(vtkAlgorithm* algorithm, int port)=0; 00065 00067 00068 virtual vtkInformation* GetOutputInformation(vtkAlgorithm* algorithm, 00069 int port)=0; 00071 00073 00074 virtual vtkDataObject* GetOutputData(vtkAlgorithm* algorithm, int port)=0; 00075 virtual void SetOutputData(vtkAlgorithm* algorithm, int port, 00076 vtkDataObject*)=0; 00078 00080 virtual vtkAlgorithmOutput* GetProducerPort(vtkDataObject*)=0; 00081 00083 00084 virtual vtkDataObject* GetInputData(vtkAlgorithm* algorithm, 00085 int port, int connection)=0; 00087 00090 virtual void UnRegister(vtkObjectBase* o); 00091 00092 static vtkInformationExecutiveKey* EXECUTIVE(); 00093 static vtkInformationIntegerKey* PORT_NUMBER(); 00094 00095 protected: 00096 vtkExecutive(); 00097 ~vtkExecutive(); 00098 00100 00104 virtual void AddAlgorithm(vtkAlgorithm* algorithm)=0; 00105 virtual void RemoveAlgorithm(vtkAlgorithm* algorithm)=0; 00107 00108 // Garbage collection support. 00109 virtual void GarbageCollectionStarting(); 00110 int GarbageCollecting; 00111 00112 //BTX 00113 friend class vtkAlgorithmToExecutiveFriendship; 00114 //ETX 00115 private: 00116 vtkExecutive(const vtkExecutive&); // Not implemented. 00117 void operator=(const vtkExecutive&); // Not implemented. 00118 }; 00119 00120 #endif