VTK  9.3.20240418
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 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkGraphEdge;
31 
32 class VTKCOMMONDATAMODEL_EXPORT vtkVertexListIterator : public vtkObject
33 {
34 public:
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 
68 protected:
71 
75 
76 private:
78  void operator=(const vtkVertexListIterator&) = delete;
79 };
80 
81 VTK_ABI_NAMESPACE_END
82 #endif
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: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:315