VTK  9.3.0
vtkEdgeListIterator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
37 #ifndef vtkEdgeListIterator_h
38 #define vtkEdgeListIterator_h
39 
40 #include "vtkCommonDataModelModule.h" // For export macro
41 #include "vtkObject.h"
42 
43 VTK_ABI_NAMESPACE_BEGIN
44 class vtkGraph;
45 class vtkGraphEdge;
46 
47 struct vtkEdgeType;
48 struct vtkOutEdgeType;
49 
50 class VTKCOMMONDATAMODEL_EXPORT vtkEdgeListIterator : public vtkObject
51 {
52 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
57  vtkGetObjectMacro(Graph, vtkGraph);
58  virtual void SetGraph(vtkGraph* graph);
59 
64 
73 
77  bool HasNext();
78 
79 protected:
82 
83  void Increment();
84 
89  bool Directed;
91 
92 private:
94  void operator=(const vtkEdgeListIterator&) = delete;
95 };
96 
97 VTK_ABI_NAMESPACE_END
98 #endif
Iterates through all edges in a graph.
vtkGraphEdge * GraphEdge
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const vtkOutEdgeType * Current
static vtkEdgeListIterator * New()
virtual void SetGraph(vtkGraph *graph)
bool HasNext()
Whether this iterator has more edges.
~vtkEdgeListIterator() override
const vtkOutEdgeType * End
vtkEdgeType Next()
Returns the next edge in the graph.
vtkGraphEdge * NextGraphEdge()
Just like Next(), but returns heavy-weight vtkGraphEdge object instead of the vtkEdgeType struct,...
Representation of a single graph edge.
Definition: vtkGraphEdge.h:25
Base class for graph data types.
Definition: vtkGraph.h:290
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract base class for most VTK objects
Definition: vtkObject.h:61
int vtkIdType
Definition: vtkType.h:315