VTK
vtkAdjacentVertexIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAdjacentVertexIterator.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
36 #ifndef vtkAdjacentVertexIterator_h
37 #define vtkAdjacentVertexIterator_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkObject.h"
41 
42 #include "vtkGraph.h" // For edge type definitions
43 
44 class vtkGraphEdge;
45 
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54  void Initialize(vtkGraph *g, vtkIdType v);
55 
57 
58  vtkGetObjectMacro(Graph, vtkGraph);
59  vtkGetMacro(Vertex, vtkIdType);
61 
63 
65  {
66  vtkOutEdgeType e = *this->Current;
67  ++this->Current;
68  return e.Target;
69  }
71 
73 
74  bool HasNext()
75  {
76  return this->Current != this->End;
77  }
79 
80 protected:
83 
85  virtual void SetGraph(vtkGraph *graph);
86 
91 
92 private:
93  vtkAdjacentVertexIterator(const vtkAdjacentVertexIterator&); // Not implemented.
94  void operator=(const vtkAdjacentVertexIterator&); // Not implemented.
95 };
96 
97 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
Iterates through adjacent vertices in a graph.
Representation of a single graph edge.
Definition: vtkGraphEdge.h:38
int vtkIdType
Definition: vtkType.h:275
Base class for graph data types.
Definition: vtkGraph.h:288
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkIdType Target
Definition: vtkGraph.h:264
static vtkObject * New()
#define VTKCOMMONDATAMODEL_EXPORT