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 "vtkInfovisCoreModule.h" // For export macro
37 #include "vtkObject.h"
38 #include "vtkGraph.h" // For vtkEdgeType
39 
41 class vtkGraph;
42 class vtkGraphEdge;
45 
47 {
48 public:
49  static vtkMutableGraphHelper *New();
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54 
57  void SetGraph(vtkGraph* g);
58  vtkGraph* GetGraph();
60 
61 //BTX
63 
64  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
65 //ETX
66  vtkGraphEdge* AddGraphEdge(vtkIdType u, vtkIdType v);
68 
70  vtkIdType AddVertex();
71 
73  void RemoveVertex(vtkIdType v);
74 
76  void RemoveVertices(vtkIdTypeArray* verts);
77 
79  void RemoveEdge(vtkIdType e);
80 
82  void RemoveEdges(vtkIdTypeArray* edges);
83 
84 protected:
87 
88  vtkGetObjectMacro(InternalGraph, vtkGraph);
89  void SetInternalGraph(vtkGraph* g);
91 
93 
96 
97 private:
98  vtkMutableGraphHelper(const vtkMutableGraphHelper&); // Not implemented.
99  void operator=(const vtkMutableGraphHelper&); // Not implemented.
100 };
101 
102 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtksys_stl::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
Helper class for building a directed or directed graph.
Representation of a single graph edge.
Definition: vtkGraphEdge.h:38
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
Base class for graph data types.
Definition: vtkGraph.h:288
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
An editable directed graph.
represent and manipulate attribute data in a dataset
An editable undirected graph.
#define VTKINFOVISCORE_EXPORT
vtkMutableDirectedGraph * DirectedGraph
vtkMutableUndirectedGraph * UndirectedGraph
static vtkObject * New()