00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkMutableGraphHelper.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 (c) Sandia Corporation 00017 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details. 00018 ----------------------------------------------------------------------------*/ 00033 #ifndef __vtkMutableGraphHelper_h 00034 #define __vtkMutableGraphHelper_h 00035 00036 #include "vtkObject.h" 00037 #include "vtkGraph.h" // For vtkEdgeType 00038 00039 class vtkDataSetAttributes; 00040 class vtkGraph; 00041 class vtkGraphEdge; 00042 class vtkMutableDirectedGraph; 00043 class vtkMutableUndirectedGraph; 00044 00045 class VTK_INFOVIS_EXPORT vtkMutableGraphHelper : public vtkObject 00046 { 00047 public: 00048 static vtkMutableGraphHelper *New(); 00049 vtkTypeRevisionMacro(vtkMutableGraphHelper, vtkObject); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 00056 void SetGraph(vtkGraph* g); 00057 vtkGraph* GetGraph(); 00059 00061 00062 vtkEdgeType AddEdge(vtkIdType u, vtkIdType v); 00063 //ETX 00064 vtkGraphEdge* AddGraphEdge(vtkIdType u, vtkIdType v); 00066 00068 vtkIdType AddVertex(); 00069 00070 protected: 00071 vtkMutableGraphHelper(); 00072 ~vtkMutableGraphHelper(); 00073 00074 vtkGetObjectMacro(InternalGraph, vtkGraph); 00075 void SetInternalGraph(vtkGraph* g); 00076 vtkGraph* InternalGraph; 00077 00078 vtkGraphEdge* GraphEdge; 00079 00080 vtkMutableDirectedGraph* DirectedGraph; 00081 vtkMutableUndirectedGraph* UndirectedGraph; 00082 00083 private: 00084 vtkMutableGraphHelper(const vtkMutableGraphHelper&); // Not implemented. 00085 void operator=(const vtkMutableGraphHelper&); // Not implemented. 00086 }; 00087 00088 #endif