VTK  9.3.20240328
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
47 #ifndef vtkEdgeListIterator_h
48 #define vtkEdgeListIterator_h
49 
50 #include "vtkCommonDataModelModule.h" // For export macro
51 #include "vtkObject.h"
52 
53 VTK_ABI_NAMESPACE_BEGIN
54 class vtkGraph;
55 class vtkGraphEdge;
56 
57 struct vtkEdgeType;
58 struct vtkOutEdgeType;
59 
60 class VTKCOMMONDATAMODEL_EXPORT vtkEdgeListIterator : public vtkObject
61 {
62 public:
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
67  vtkGetObjectMacro(Graph, vtkGraph);
68  virtual void SetGraph(vtkGraph* graph);
69 
74 
83 
87  bool HasNext();
88 
89 protected:
92 
93  void Increment();
94 
99  bool Directed;
101 
102 private:
103  vtkEdgeListIterator(const vtkEdgeListIterator&) = delete;
104  void operator=(const vtkEdgeListIterator&) = delete;
105 };
106 
107 VTK_ABI_NAMESPACE_END
108 #endif
Iterates through all edges in a graph.
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:340
a simple class to control print indentation
Definition: vtkIndent.h:108
abstract base class for most VTK objects
Definition: vtkObject.h:161
int vtkIdType
Definition: vtkType.h:315