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 ----------------------------------------------------------------------------*/
34 #ifndef vtkMutableGraphHelper_h
35 #define vtkMutableGraphHelper_h
36 
37 #include "vtkInfovisCoreModule.h" // For export macro
38 #include "vtkObject.h"
39 #include "vtkGraph.h" // For vtkEdgeType
40 
42 class vtkGraph;
43 class vtkGraphEdge;
46 
47 class VTKINFOVISCORE_EXPORT vtkMutableGraphHelper : public vtkObject
48 {
49 public:
50  static vtkMutableGraphHelper *New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
60  void SetGraph(vtkGraph* g);
61  vtkGraph* GetGraph();
63 
67  vtkEdgeType AddEdge(vtkIdType u, vtkIdType v);
68 
69  vtkGraphEdge* AddGraphEdge(vtkIdType u, vtkIdType v);
70 
74  vtkIdType AddVertex();
75 
79  void RemoveVertex(vtkIdType v);
80 
84  void RemoveVertices(vtkIdTypeArray* verts);
85 
89  void RemoveEdge(vtkIdType e);
90 
94  void RemoveEdges(vtkIdTypeArray* edges);
95 
96 protected:
98  ~vtkMutableGraphHelper() override;
99 
100  vtkGetObjectMacro(InternalGraph, vtkGraph);
101  void SetInternalGraph(vtkGraph* g);
103 
105 
108 
109 private:
111  void operator=(const vtkMutableGraphHelper&) = delete;
112 };
113 
114 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Helper class for building a directed or directed graph.
Representation of a single graph edge.
Definition: vtkGraphEdge.h:39
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:347
Base class for graph data types.
Definition: vtkGraph.h:287
a simple class to control print indentation
Definition: vtkIndent.h:39
An editable directed graph.
represent and manipulate attribute data in a dataset
An editable undirected graph.
vtkMutableDirectedGraph * DirectedGraph
vtkMutableUndirectedGraph * UndirectedGraph
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)