VTK  9.3.20240424
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
53VTK_ABI_NAMESPACE_BEGIN
54class vtkGraph;
55class vtkGraphEdge;
56
57struct vtkEdgeType;
58struct vtkOutEdgeType;
59
60class VTKCOMMONDATAMODEL_EXPORT vtkEdgeListIterator : public vtkObject
61{
62public:
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
89protected:
92
93 void Increment();
94
101
102private:
104 void operator=(const vtkEdgeListIterator&) = delete;
105};
106
107VTK_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
virtual void SetGraph(vtkGraph *graph)
bool HasNext()
Whether this iterator has more edges.
~vtkEdgeListIterator() override
const vtkOutEdgeType * End
vtkGraphEdge * NextGraphEdge()
Just like Next(), but returns heavy-weight vtkGraphEdge object instead of the vtkEdgeType struct,...
static vtkEdgeListIterator * New()
vtkEdgeType Next()
Returns the next edge in the graph.
Representation of a single graph edge.
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:162
int vtkIdType
Definition vtkType.h:315