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

Common/vtkSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSource.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 =========================================================================*/
00065 #ifndef __vtkSource_h
00066 #define __vtkSource_h
00067 
00068 #include "vtkProcessObject.h"
00069 
00070 class vtkDataObject;
00071 class vtkErrorCode;
00072 
00073 class VTK_COMMON_EXPORT vtkSource : public vtkProcessObject
00074 {
00075 public:
00076   vtkTypeRevisionMacro(vtkSource,vtkProcessObject);
00077   void PrintSelf(ostream& os, vtkIndent indent);
00078 
00082   virtual void Update();
00083 
00086   virtual void UpdateWholeExtent();
00087 
00090   virtual void UpdateInformation();
00091 
00092   virtual void PropagateUpdateExtent(vtkDataObject *output);
00093 
00094   virtual void TriggerAsynchronousUpdate();
00095 
00096   virtual void UpdateData(vtkDataObject *output);
00097 
00101   virtual void ComputeInputUpdateExtents( vtkDataObject *output );
00102 
00104 
00106   virtual void SetReleaseDataFlag(int);
00107   virtual int GetReleaseDataFlag();
00108   vtkBooleanMacro(ReleaseDataFlag,int);
00110 
00112   virtual void UnRegister(vtkObjectBase *o);
00113   
00115   virtual int InRegisterLoop(vtkObject *);
00116 
00118 
00120   vtkDataObject **GetOutputs();
00121   vtkGetMacro(NumberOfOutputs,int);
00123 
00127   void UnRegisterAllOutputs(void);
00128 
00131   int GetOutputIndex(vtkDataObject *out);
00132   
00134 
00136   vtkGetMacro( ErrorCode, unsigned long );
00138 
00139 protected:
00140   vtkSource();
00141   ~vtkSource();
00142 
00144 
00147   virtual void ExecuteData(vtkDataObject *vtkNotUsed(output)) {
00148     this->Execute(); };
00150 
00152   virtual void Execute();
00153 
00154   // By default, UpdateInformation calls this method to copy information
00155   // unmodified from the input to the output.
00156   virtual void ExecuteInformation();
00157 
00158   // Called to allocate the input array.  Copies old inputs.
00159   void SetNumberOfOutputs(int num);
00160 
00161   // method used internally for getting an output.
00162   vtkDataObject *GetOutput(int idx);
00163 
00164   // protected methods for setting inputs.
00165   virtual void SetNthOutput(int num, vtkDataObject *output);
00166   virtual void AddOutput(vtkDataObject *output);
00167   virtual void RemoveOutput(vtkDataObject *output);
00168   
00169   vtkDataObject **Outputs;     // An Array of the outputs to the filter
00170   int NumberOfOutputs;
00171   int Updating;
00172   // Time when ExecuteInformation was last called.
00173   vtkTimeStamp InformationTime;
00174 
00176 
00178   vtkSetMacro( ErrorCode, unsigned long );
00180 private:
00181   vtkSource(const vtkSource&);  // Not implemented.
00182   void operator=(const vtkSource&);  // Not implemented.
00183 
00184   unsigned long ErrorCode;
00185 };
00186 
00187 #endif
00188 
00189 
00190