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
28 #ifndef vtkEdgeListIterator_h
29 #define vtkEdgeListIterator_h
30 
31 #include "vtkCommonDataModelModule.h" // For export macro
32 #include "vtkObject.h"
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class vtkGraph;
36 class vtkGraphEdge;
37 
38 struct vtkEdgeType;
39 struct vtkOutEdgeType;
40 
41 class VTKCOMMONDATAMODEL_EXPORT vtkEdgeListIterator : public vtkObject
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
48  vtkGetObjectMacro(Graph, vtkGraph);
49  virtual void SetGraph(vtkGraph* graph);
50 
55 
64 
68  bool HasNext();
69 
70 protected:
73 
74  void Increment();
75 
80  bool Directed;
82 
83 private:
85  void operator=(const vtkEdgeListIterator&) = delete;
86 };
87 
88 VTK_ABI_NAMESPACE_END
89 #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:281
a simple class to control print indentation
Definition: vtkIndent.h:29
abstract base class for most VTK objects
Definition: vtkObject.h:52
int vtkIdType
Definition: vtkType.h:315