VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDirectedGraphAlgorithm.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 -------------------------------------------------------------------------*/ 00042 #ifndef __vtkDirectedGraphAlgorithm_h 00043 #define __vtkDirectedGraphAlgorithm_h 00044 00045 #include "vtkCommonExecutionModelModule.h" // For export macro 00046 #include "vtkAlgorithm.h" 00047 #include "vtkDirectedGraph.h" // makes things a bit easier 00048 00049 class vtkDataSet; 00050 00051 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkDirectedGraphAlgorithm : public vtkAlgorithm 00052 { 00053 public: 00054 static vtkDirectedGraphAlgorithm *New(); 00055 vtkTypeMacro(vtkDirectedGraphAlgorithm,vtkAlgorithm); 00056 void PrintSelf(ostream& os, vtkIndent indent); 00057 00059 00060 virtual int ProcessRequest(vtkInformation*, 00061 vtkInformationVector**, 00062 vtkInformationVector*); 00064 00066 00067 vtkDirectedGraph* GetOutput() { return this->GetOutput(0); } 00068 vtkDirectedGraph* GetOutput(int index); 00070 00072 00075 void SetInputData(vtkDataObject * obj) { this->SetInputData(0, obj); } 00076 void SetInputData(int index, vtkDataObject* obj); 00078 00079 protected: 00080 vtkDirectedGraphAlgorithm(); 00081 ~vtkDirectedGraphAlgorithm(); 00082 00083 // convenience method 00084 virtual int RequestInformation(vtkInformation* request, 00085 vtkInformationVector** inputVector, 00086 vtkInformationVector* outputVector); 00087 00089 00091 virtual int RequestData(vtkInformation* request, 00092 vtkInformationVector** inputVector, 00093 vtkInformationVector* outputVector); 00095 00097 00099 virtual int RequestUpdateExtent(vtkInformation*, 00100 vtkInformationVector**, 00101 vtkInformationVector*); 00103 00104 // see algorithm for more info 00105 virtual int FillOutputPortInformation(int port, vtkInformation* info); 00106 virtual int FillInputPortInformation(int port, vtkInformation* info); 00107 00108 private: 00109 vtkDirectedGraphAlgorithm(const vtkDirectedGraphAlgorithm&); // Not implemented. 00110 void operator=(const vtkDirectedGraphAlgorithm&); // Not implemented. 00111 }; 00112 00113 #endif