VTK  9.4.20250302
vtkVertexListIterator.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
21#ifndef vtkVertexListIterator_h
22#define vtkVertexListIterator_h
23
24#include "vtkCommonDataModelModule.h" // For export macro
25#include "vtkObject.h"
26
27#include "vtkGraph.h" // For edge type definitions
28
29VTK_ABI_NAMESPACE_BEGIN
30class vtkGraphEdge;
31
32class VTKCOMMONDATAMODEL_EXPORT vtkVertexListIterator : public vtkObject
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
42 virtual void SetGraph(vtkGraph* graph);
43
45
48 vtkGetObjectMacro(Graph, vtkGraph);
50
52
56 {
57 vtkIdType v = this->Current;
58 ++this->Current;
59 return v;
60 }
62
66 bool HasNext() { return this->Current != this->End; }
67
68protected:
71
75
76private:
78 void operator=(const vtkVertexListIterator&) = delete;
79};
80
81VTK_ABI_NAMESPACE_END
82#endif
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
Iterates all vertices in a graph.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType Next()
Returns the next edge in the graph.
virtual void SetGraph(vtkGraph *graph)
Setup the iterator with a graph.
~vtkVertexListIterator() override
static vtkVertexListIterator * New()
bool HasNext()
Whether this iterator has more edges.
int vtkIdType
Definition vtkType.h:332