VTK
dox/Common/ExecutionModel/vtkGraphAlgorithm.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGraphAlgorithm.h
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   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00044 #ifndef __vtkGraphAlgorithm_h
00045 #define __vtkGraphAlgorithm_h
00046 
00047 #include "vtkCommonExecutionModelModule.h" // For export macro
00048 #include "vtkAlgorithm.h"
00049 #include "vtkGraph.h" // makes things a bit easier
00050 
00051 class vtkDataSet;
00052 
00053 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkGraphAlgorithm : public vtkAlgorithm
00054 {
00055 public:
00056   static vtkGraphAlgorithm *New();
00057   vtkTypeMacro(vtkGraphAlgorithm,vtkAlgorithm);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00062   virtual int ProcessRequest(vtkInformation*,
00063                              vtkInformationVector**,
00064                              vtkInformationVector*);
00066 
00068 
00069   vtkGraph* GetOutput() { return this->GetOutput(0); }
00070   vtkGraph* GetOutput(int index);
00072 
00074 
00077   void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); }
00078   void SetInputData(int index, vtkDataObject* obj);
00080 
00081 protected:
00082   vtkGraphAlgorithm();
00083   ~vtkGraphAlgorithm();
00084 
00085   // convenience method
00086   virtual int RequestInformation(vtkInformation* request,
00087                                  vtkInformationVector** inputVector,
00088                                  vtkInformationVector* outputVector);
00089 
00090   virtual int RequestDataObject(vtkInformation* request,
00091                                 vtkInformationVector** inputVector,
00092                                 vtkInformationVector* outputVector);
00093 
00094 
00096 
00098   virtual int RequestData(vtkInformation* request,
00099                           vtkInformationVector** inputVector,
00100                           vtkInformationVector* outputVector);
00102 
00104 
00106   virtual int RequestUpdateExtent(vtkInformation*,
00107                                   vtkInformationVector**,
00108                                   vtkInformationVector*);
00110 
00111   // see algorithm for more info
00112   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00113   virtual int FillInputPortInformation(int port, vtkInformation* info);
00114 
00115 private:
00116   vtkGraphAlgorithm(const vtkGraphAlgorithm&);  // Not implemented.
00117   void operator=(const vtkGraphAlgorithm&);  // Not implemented.
00118 };
00119 
00120 #endif