vtkInputPort.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInputPort.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 =========================================================================*/
00015 /*========================================================================
00016 
00017   This module copied from VTK 4.5 vtkInputPort.h. There have been no
00018   significant modifications made.
00019 
00020 =========================================================================*/
00021 
00022 #ifndef __vtkInputPort_h
00023 #define __vtkInputPort_h
00024 
00029 #include <vtkDataSetAlgorithm.h>
00030 
00031 class vtkMultiProcessController;
00032 
00048 class VTK_PARALLEL_EXPORT vtkInputPort : public vtkDataSetAlgorithm
00049   {
00050   /****************************************************************************/
00051                               public:
00052 
00058   static vtkInputPort *New();
00059   
00060   vtkTypeRevisionMacro(vtkInputPort,vtkDataSetAlgorithm);
00061 
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068 
00074   void SetRemoteProcessId(int id);
00075 
00080   int GetRemoteProcessId() const;
00081 
00088   void SetTag(int tag);
00089 
00094   int GetTag() const;
00095 
00100   unsigned long GetMTime();
00101 
00107   vtkMultiProcessController *GetController() {return this->Controller;}
00108 
00113   virtual void SetController(vtkMultiProcessController *controller);
00114   
00124   void SetDoUpdateInformation(int boolean);
00125 
00131   int GetDoUpdateInformation() const;
00132   
00133 //BTX
00134 
00138   enum Tags {
00139     DOWN_DATA_TIME_TAG       = 98970,
00140     UPDATE_EXTENT_TAG        = 98971,
00141     TRANSFER_NEEDED_TAG      = 98972,
00142     INFORMATION_TRANSFER_TAG = 98973,
00143     DATA_TRANSFER_TAG        = 98974,
00144     NEW_DATA_TIME_TAG        = 98975,
00145     DATA_TYPE_TAG            = 98976
00146   };
00147 
00148 //ETX
00149 
00150   /****************************************************************************/
00151                              protected:
00152   vtkInputPort();
00153   ~vtkInputPort();  
00154   
00155   vtkMultiProcessController *Controller;
00156   int RemoteProcessId;
00157   int Tag;
00158 
00159   unsigned long DataTime;
00160   unsigned long UpStreamMTime;
00161   int DoUpdateInformation;
00162 
00163   int LastUpdatePiece;
00164   int LastUpdateNumberOfPieces;
00165   int LastUpdateGhostLevel;
00166 
00167   vtkSetVector6Macro(LastUpdateExtent, int);
00168   int LastUpdateExtent[6];
00169 
00170   int UpdateExtentIsOutsideOfTheExtent(vtkDataObject *output);
00171 
00172   // This is called by the superclass.
00173   // This is the method you should override.
00174   virtual int RequestDataObject(vtkInformation* request, 
00175                                 vtkInformationVector** inputVector, 
00176                                 vtkInformationVector* outputVector);
00177   virtual int RequestInformation(vtkInformation* request, 
00178                                  vtkInformationVector** inputVector, 
00179                                  vtkInformationVector* outputVector);
00180   virtual int RequestData(vtkInformation* request, 
00181                           vtkInformationVector** inputVector, 
00182                           vtkInformationVector* outputVector);
00183 
00187   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00188 
00189   /****************************************************************************/
00190                              private:
00194   vtkInputPort(const vtkInputPort&);  // Not implemented.
00195   void operator=(const vtkInputPort&);  // Not implemented.
00196   };
00197 
00198 /*
00199  * $Log: vtkInputPort.h,v $
00200  * Revision 1.5  2008/09/26 02:46:13  pfb
00201  * Added note about depreciation.
00202  *
00203  * Revision 1.4  2006/08/29 15:29:39  pfb
00204  * Changed documentation.
00205  *
00206  * Revision 1.3  2006/08/23 17:02:06  pfb
00207  * Expanded some Get / Set macros. Documentation.
00208  *
00209  * Revision 1.2  2006/03/22 13:23:31  pfb
00210  * Documentation.
00211  *
00212  * Revision 1.1  2006/03/20 05:31:28  pfb
00213  * Initial rev.
00214  *
00215  *
00216  */
00217 
00221 #endif
00222 
00223