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

dox/Parallel/vtkInputPort.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInputPort.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 =========================================================================*/
00043 #ifndef __vtkInputPort_h
00044 #define __vtkInputPort_h
00045 
00046 #include "vtkSource.h"
00047 
00048 class vtkPolyData;
00049 class vtkUnstructuredGrid;
00050 class vtkStructuredGrid;
00051 class vtkRectilinearGrid;
00052 class vtkStructuredPoints;
00053 class vtkImageData;
00054 class vtkMultiProcessController;
00055 
00056 class VTK_PARALLEL_EXPORT vtkInputPort : public vtkSource
00057 {
00058 public:
00059   static vtkInputPort *New();
00060   vtkTypeRevisionMacro(vtkInputPort,vtkSource);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00064 
00068   vtkPolyData *GetPolyDataOutput();
00069   vtkUnstructuredGrid *GetUnstructuredGridOutput();
00070   vtkStructuredGrid *GetStructuredGridOutput();
00071   vtkRectilinearGrid *GetRectilinearGridOutput();
00072   vtkStructuredPoints *GetStructuredPointsOutput();
00073   vtkImageData *GetImageDataOutput();
00075   
00077 
00080   vtkSetMacro(RemoteProcessId, int);
00081   vtkGetMacro(RemoteProcessId, int);
00082   vtkSetMacro(Tag, int);
00083   vtkGetMacro(Tag, int);
00085   
00087   void UpdateInformation();
00088 
00090   void PropagateUpdateExtent(vtkDataObject *vtkNotUsed(output)) {};
00091 
00093   void UpdateData( vtkDataObject *out );
00094 
00096   void TriggerAsynchronousUpdate();  
00097   
00099 
00101   vtkMultiProcessController *GetController() {return this->Controller;}
00102   virtual void SetController(vtkMultiProcessController*);
00104   
00106 
00111   vtkSetMacro(DoUpdateInformation, int);
00112   vtkGetMacro(DoUpdateInformation, int);
00114   
00115 //BTX
00116 
00117 // Arbitrary tags used by the ports for communication.
00118   enum Tags {
00119     DOWN_DATA_TIME_TAG = 98970,
00120     UPDATE_EXTENT_TAG = 98971,
00121     TRANSFER_NEEDED_TAG = 98972,
00122     INFORMATION_TRANSFER_TAG = 98973,
00123     DATA_TRANSFER_TAG = 98974,
00124     NEW_DATA_TIME_TAG = 98975
00125   };
00126 
00127 //ETX
00128 
00129 protected:
00130   vtkInputPort();
00131   ~vtkInputPort();  
00132   
00133   vtkMultiProcessController *Controller;
00134   int RemoteProcessId;
00135   int Tag;
00136 
00137   unsigned long DataTime;
00138   unsigned long UpStreamMTime;
00139   int TransferNeeded;
00140   int DoUpdateInformation;
00141 private:
00142   vtkInputPort(const vtkInputPort&);  // Not implemented.
00143   void operator=(const vtkInputPort&);  // Not implemented.
00144 };
00145 
00146 #endif
00147 
00148