VTK  9.3.0
vtkMutableGraphHelper.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
28 #ifndef vtkMutableGraphHelper_h
29 #define vtkMutableGraphHelper_h
30 
31 #include "vtkGraph.h" // For vtkEdgeType
32 #include "vtkInfovisCoreModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 VTK_ABI_NAMESPACE_BEGIN
37 class vtkGraph;
38 class vtkGraphEdge;
41 
42 class VTKINFOVISCORE_EXPORT vtkMutableGraphHelper : public vtkObject
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
55  void SetGraph(vtkGraph* g);
58 
63 
65 
70 
75 
80 
85 
90 
91 protected:
94 
95  vtkGetObjectMacro(InternalGraph, vtkGraph);
98 
100 
103 
104 private:
106  void operator=(const vtkMutableGraphHelper&) = delete;
107 };
108 
109 VTK_ABI_NAMESPACE_END
110 #endif
represent and manipulate attribute data in a dataset
Representation of a single graph edge.
Definition: vtkGraphEdge.h:25
Base class for graph data types.
Definition: vtkGraph.h:290
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:38
An editable directed graph.
Helper class for building a directed or directed graph.
vtkGraph * GetGraph()
Set the underlying graph that you want to modify with this helper.
vtkMutableUndirectedGraph * UndirectedGraph
vtkGraphEdge * AddGraphEdge(vtkIdType u, vtkIdType v)
void SetGraph(vtkGraph *g)
Set the underlying graph that you want to modify with this helper.
vtkMutableDirectedGraph * DirectedGraph
vtkEdgeType AddEdge(vtkIdType u, vtkIdType v)
Add an edge to the underlying mutable graph.
static vtkMutableGraphHelper * New()
void RemoveVertex(vtkIdType v)
Remove a vertex from the underlying mutable graph.
vtkIdType AddVertex()
Add a vertex to the underlying mutable graph.
void RemoveVertices(vtkIdTypeArray *verts)
Remove a collection of vertices from the underlying mutable graph.
void SetInternalGraph(vtkGraph *g)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkMutableGraphHelper() override
void RemoveEdge(vtkIdType e)
Remove an edge from the underlying mutable graph.
void RemoveEdges(vtkIdTypeArray *edges)
Remove a collection of edges from the underlying mutable graph.
An editable undirected graph.
abstract base class for most VTK objects
Definition: vtkObject.h:61
std::pair< boost::graph_traits< vtkGraph * >::edge_iterator, boost::graph_traits< vtkGraph * >::edge_iterator > edges(vtkGraph *g)
int vtkIdType
Definition: vtkType.h:315