VTK
vtkMutableGraphHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMutableGraphHelper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*----------------------------------------------------------------------------
16  Copyright (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
33 #ifndef __vtkMutableGraphHelper_h
34 #define __vtkMutableGraphHelper_h
35 
36 #include "vtkObject.h"
37 #include "vtkGraph.h" // For vtkEdgeType
38 
40 class vtkGraph;
41 class vtkGraphEdge;
44 
46 {
47 public:
48  static vtkMutableGraphHelper *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
56  void SetGraph(vtkGraph* g);
57  vtkGraph* GetGraph();
59 
60 //BTX
62 
63  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
64 //ETX
65  vtkGraphEdge* AddGraphEdge(vtkIdType u, vtkIdType v);
67 
69  vtkIdType AddVertex();
70 
72  void RemoveVertex(vtkIdType v);
73 
75  void RemoveVertices(vtkIdTypeArray* verts);
76 
78  void RemoveEdge(vtkIdType e);
79 
81  void RemoveEdges(vtkIdTypeArray* edges);
82 
83 protected:
86 
87  vtkGetObjectMacro(InternalGraph, vtkGraph);
88  void SetInternalGraph(vtkGraph* g);
90 
92 
95 
96 private:
97  vtkMutableGraphHelper(const vtkMutableGraphHelper&); // Not implemented.
98  void operator=(const vtkMutableGraphHelper&); // Not implemented.
99 };
100 
101 #endif