VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkMutableDirectedGraph.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 =========================================================================*/ 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 -------------------------------------------------------------------------*/ 00037 #ifndef __vtkMutableDirectedGraph_h 00038 #define __vtkMutableDirectedGraph_h 00039 00040 #include "vtkDirectedGraph.h" 00041 00042 class vtkEdgeListIterator; 00043 class vtkGraphEdge; 00044 class vtkVariant; 00045 00046 class VTK_FILTERING_EXPORT vtkMutableDirectedGraph : public vtkDirectedGraph 00047 { 00048 public: 00049 static vtkMutableDirectedGraph *New(); 00050 vtkTypeRevisionMacro(vtkMutableDirectedGraph, vtkDirectedGraph); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00052 00061 vtkIdType AddVertex(); 00062 00076 vtkIdType AddVertex(vtkVariantArray *propertyArr); 00077 00078 //BTX 00080 00090 vtkIdType AddVertex(const vtkVariant& pedigreeId); 00091 //ETX 00093 00100 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v); 00101 00103 00108 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v, 00109 vtkVariantArray *propertyArr); 00111 00112 //BTX 00114 00121 vtkEdgeType AddEdge(const vtkVariant& uPedigreeId, vtkIdType v, 00122 vtkVariantArray *propertyArr = 0); 00124 00126 00133 vtkEdgeType AddEdge(vtkIdType u, const vtkVariant& vPedigreeId, 00134 vtkVariantArray *propertyArr = 0); 00136 00138 00145 vtkEdgeType AddEdge(const vtkVariant& uPedigreeId, 00146 const vtkVariant& vPedigreeId, 00147 vtkVariantArray *propertyArr = 0); 00148 //ETX 00150 00155 void LazyAddVertex(); 00156 00161 void LazyAddVertex(vtkVariantArray *propertyArr); 00162 00163 //BTX 00167 void LazyAddVertex(const vtkVariant& pedigreeId); 00168 00175 void LazyAddEdge(vtkIdType u, vtkIdType v, vtkVariantArray *propertyArr = 0); 00176 00178 00186 void LazyAddEdge(const vtkVariant& uPedigreeId, vtkIdType v, 00187 vtkVariantArray *propertyArr = 0); 00189 00191 00199 void LazyAddEdge(vtkIdType u, const vtkVariant& vPedigreeId, 00200 vtkVariantArray *propertyArr = 0); 00202 00204 00212 void LazyAddEdge(const vtkVariant& uPedigreeId, 00213 const vtkVariant& vPedigreeId, 00214 vtkVariantArray *propertyArr = 0); 00215 //ETX 00217 00221 vtkGraphEdge *AddGraphEdge(vtkIdType u, vtkIdType v); 00222 00224 00229 vtkIdType AddChild(vtkIdType parent, 00230 vtkVariantArray *propertyArr); 00231 vtkIdType AddChild(vtkIdType parent) 00232 { return this->AddChild(parent, 0); } 00234 00235 protected: 00236 vtkMutableDirectedGraph(); 00237 ~vtkMutableDirectedGraph(); 00238 00240 vtkGraphEdge *GraphEdge; 00241 00242 private: 00243 vtkMutableDirectedGraph(const vtkMutableDirectedGraph&); // Not implemented. 00244 void operator=(const vtkMutableDirectedGraph&); // Not implemented. 00245 }; 00246 00247 #endif