VTK
dox/Common/ExecutionModel/vtkUndirectedGraphAlgorithm.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkUndirectedGraphAlgorithm.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 -------------------------------------------------------------------------*/
00039 #ifndef __vtkUndirectedGraphAlgorithm_h
00040 #define __vtkUndirectedGraphAlgorithm_h
00041 
00042 #include "vtkCommonExecutionModelModule.h" // For export macro
00043 #include "vtkAlgorithm.h"
00044 #include "vtkUndirectedGraph.h" // makes things a bit easier
00045 
00046 class vtkDataSet;
00047 
00048 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkUndirectedGraphAlgorithm : public vtkAlgorithm
00049 {
00050 public:
00051   static vtkUndirectedGraphAlgorithm *New();
00052   vtkTypeMacro(vtkUndirectedGraphAlgorithm,vtkAlgorithm);
00053   void PrintSelf(ostream& os, vtkIndent indent);
00054 
00056 
00057   virtual int ProcessRequest(vtkInformation*,
00058                              vtkInformationVector**,
00059                              vtkInformationVector*);
00061 
00063 
00064   vtkUndirectedGraph* GetOutput() { return this->GetOutput(0); }
00065   vtkUndirectedGraph* GetOutput(int index);
00067 
00069 
00072   void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); }
00073   void SetInputData(int index, vtkDataObject* obj);
00075 
00076 protected:
00077   vtkUndirectedGraphAlgorithm();
00078   ~vtkUndirectedGraphAlgorithm();
00079 
00080   // convenience method
00081   virtual int RequestInformation(vtkInformation* request,
00082                                  vtkInformationVector** inputVector,
00083                                  vtkInformationVector* outputVector);
00084 
00086 
00088   virtual int RequestData(vtkInformation* request,
00089                           vtkInformationVector** inputVector,
00090                           vtkInformationVector* outputVector);
00092 
00094 
00096   virtual int RequestUpdateExtent(vtkInformation*,
00097                                   vtkInformationVector**,
00098                                   vtkInformationVector*);
00100 
00101   // see algorithm for more info
00102   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00103   virtual int FillInputPortInformation(int port, vtkInformation* info);
00104 
00105 private:
00106   vtkUndirectedGraphAlgorithm(const vtkUndirectedGraphAlgorithm&);  // Not implemented.
00107   void operator=(const vtkUndirectedGraphAlgorithm&);  // Not implemented.
00108 };
00109 
00110 #endif