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

vtkDistributedExecutive.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDistributedExecutive.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 =========================================================================*/
00036 #ifndef __vtkDistributedExecutive_h
00037 #define __vtkDistributedExecutive_h
00038 
00039 #include "vtkExecutive.h"
00040 
00041 class VTK_FILTERING_EXPORT vtkDistributedExecutive : public vtkExecutive
00042 {
00043 public:
00044   static vtkDistributedExecutive* New();
00045   vtkTypeRevisionMacro(vtkDistributedExecutive,vtkExecutive);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00051   vtkAlgorithm* GetAlgorithm();
00052 
00054 
00057   virtual int Update();
00058   virtual int Update(int port);
00059   virtual int Update(vtkAlgorithm* algorithm);
00060   virtual int Update(vtkAlgorithm* algorithm, int port);
00062 
00064 
00065   virtual vtkInformation* GetOutputInformation(int port);
00066   virtual vtkInformation* GetOutputInformation(vtkAlgorithm* algorithm,
00067                                                int port);
00069 
00071 
00072   virtual vtkDataObject* GetOutputData(int port);
00073   virtual vtkDataObject* GetOutputData(vtkAlgorithm* algorithm, int port);
00074   virtual void SetOutputData(int port, vtkDataObject*);
00075   virtual void SetOutputData(vtkAlgorithm* algorithm, int port, 
00076                              vtkDataObject*);
00078 
00080 
00081   virtual vtkDataObject* GetInputData(vtkAlgorithm* algorithm, 
00082                                       int port, int connection);
00083   virtual vtkDataObject* GetInputData(int port, int connection);
00085 
00086 
00088   virtual vtkAlgorithmOutput* GetProducerPort(vtkDataObject*);
00089 
00090 protected:
00091   vtkDistributedExecutive();
00092   ~vtkDistributedExecutive();
00093 
00094   // Helper methods for subclasses.
00095   int InputPortIndexInRange(int port, const char* action);
00096   int OutputPortIndexInRange(int port, const char* action);
00097 
00098   // Implement methods required by superclass.
00099   virtual void AddAlgorithm(vtkAlgorithm* algorithm);
00100   virtual void RemoveAlgorithm(vtkAlgorithm* algorithm);
00101   virtual void ReportReferences(vtkGarbageCollector*);
00102   virtual void RemoveReferences();
00103 
00104   // A distributed executive manages at most one algorithm.
00105   virtual void SetAlgorithm(vtkAlgorithm* algorithm);
00106   vtkAlgorithm* Algorithm;
00107 
00108 private:
00109   vtkDistributedExecutive(const vtkDistributedExecutive&);  // Not implemented.
00110   void operator=(const vtkDistributedExecutive&);  // Not implemented.
00111 };
00112 
00113 #endif