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

dox/Common/vtkSource.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkSource.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 =========================================================================*/ 00047 #ifndef __vtkSource_h 00048 #define __vtkSource_h 00049 00050 #include "vtkProcessObject.h" 00051 00052 class vtkDataObject; 00053 00054 class VTK_COMMON_EXPORT vtkSource : public vtkProcessObject 00055 { 00056 public: 00057 vtkTypeRevisionMacro(vtkSource,vtkProcessObject); 00058 void PrintSelf(ostream& os, vtkIndent indent); 00059 00063 virtual void Update(); 00064 00067 virtual void UpdateWholeExtent(); 00068 00071 virtual void UpdateInformation(); 00072 00073 virtual void PropagateUpdateExtent(vtkDataObject *output); 00074 00075 virtual void TriggerAsynchronousUpdate(); 00076 00077 virtual void UpdateData(vtkDataObject *output); 00078 00082 virtual void ComputeInputUpdateExtents( vtkDataObject *output ); 00083 00085 00087 virtual void SetReleaseDataFlag(int); 00088 virtual int GetReleaseDataFlag(); 00089 vtkBooleanMacro(ReleaseDataFlag,int); 00091 00093 virtual void UnRegister(vtkObjectBase *o); 00094 00096 virtual int InRegisterLoop(vtkObject *); 00097 00099 00101 vtkDataObject **GetOutputs(); 00102 vtkGetMacro(NumberOfOutputs,int); 00104 00108 void UnRegisterAllOutputs(void); 00109 00112 int GetOutputIndex(vtkDataObject *out); 00113 00114 protected: 00115 vtkSource(); 00116 ~vtkSource(); 00117 00121 virtual void ExecuteData(vtkDataObject *output); 00122 00127 int UpdateExtentIsEmpty(vtkDataObject *output); 00128 00130 virtual void Execute(); 00131 00132 // By default, UpdateInformation calls this method to copy information 00133 // unmodified from the input to the output. 00134 virtual void ExecuteInformation(); 00135 00136 // Called to allocate the input array. Copies old inputs. 00137 void SetNumberOfOutputs(int num); 00138 00139 // method used internally for getting an output. 00140 vtkDataObject *GetOutput(int idx); 00141 00142 // protected methods for setting inputs. 00143 virtual void SetNthOutput(int num, vtkDataObject *output); 00144 virtual void AddOutput(vtkDataObject *output); 00145 virtual void RemoveOutput(vtkDataObject *output); 00146 00147 vtkDataObject **Outputs; // An Array of the outputs to the filter 00148 int NumberOfOutputs; 00149 int Updating; 00150 // Time when ExecuteInformation was last called. 00151 vtkTimeStamp InformationTime; 00152 00153 private: 00154 vtkSource(const vtkSource&); // Not implemented. 00155 void operator=(const vtkSource&); // Not implemented. 00156 }; 00157 00158 #endif 00159 00160 00161