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

Parallel/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 =========================================================================*/
00039 #ifndef __vtkInputPort_h
00040 #define __vtkInputPort_h
00041 
00042 #include "vtkSource.h"
00043 
00044 class vtkPolyData;
00045 class vtkUnstructuredGrid;
00046 class vtkStructuredGrid;
00047 class vtkRectilinearGrid;
00048 class vtkStructuredPoints;
00049 class vtkImageData;
00050 class vtkMultiProcessController;
00051 
00052 class VTK_PARALLEL_EXPORT vtkInputPort : public vtkSource
00053 {
00054 public:
00055   static vtkInputPort *New();
00056   vtkTypeRevisionMacro(vtkInputPort,vtkSource);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00064   vtkPolyData *GetPolyDataOutput();
00065   vtkUnstructuredGrid *GetUnstructuredGridOutput();
00066   vtkStructuredGrid *GetStructuredGridOutput();
00067   vtkRectilinearGrid *GetRectilinearGridOutput();
00068   vtkStructuredPoints *GetStructuredPointsOutput();
00069   vtkImageData *GetImageDataOutput();
00071   
00073 
00076   vtkSetMacro(RemoteProcessId, int);
00077   vtkGetMacro(RemoteProcessId, int);
00078   vtkSetMacro(Tag, int);
00079   vtkGetMacro(Tag, int);
00081   
00083   void UpdateInformation();
00084 
00086   void PropagateUpdateExtent(vtkDataObject *vtkNotUsed(output)) {};
00087 
00089   void UpdateData( vtkDataObject *out );
00090 
00092   void TriggerAsynchronousUpdate();  
00093   
00095 
00097   vtkMultiProcessController *GetController() {return this->Controller;}
00098   virtual void SetController(vtkMultiProcessController*);
00100   
00102 
00107   vtkSetMacro(DoUpdateInformation, int);
00108   vtkGetMacro(DoUpdateInformation, int);
00110   
00111 //BTX
00112 
00113 // Arbitrary tags used by the ports for communication.
00114   enum Tags {
00115     DOWN_DATA_TIME_TAG = 98970,
00116     UPDATE_EXTENT_TAG = 98971,
00117     TRANSFER_NEEDED_TAG = 98972,
00118     INFORMATION_TRANSFER_TAG = 98973,
00119     DATA_TRANSFER_TAG = 98974,
00120     NEW_DATA_TIME_TAG = 98975
00121   };
00122 
00123 //ETX
00124 
00125 protected:
00126   vtkInputPort();
00127   ~vtkInputPort();  
00128   
00129   vtkMultiProcessController *Controller;
00130   int RemoteProcessId;
00131   int Tag;
00132 
00133   unsigned long DataTime;
00134   unsigned long UpStreamMTime;
00135   int TransferNeeded;
00136   int DoUpdateInformation;
00137 private:
00138   vtkInputPort(const vtkInputPort&);  // Not implemented.
00139   void operator=(const vtkInputPort&);  // Not implemented.
00140 };
00141 
00142 #endif
00143 
00144