VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Filtering
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 "
vtkObject.h
"
40
41
#include "
vtkGraph.h
"
// For edge type definitions
42
43
class
vtkGraphEdge
;
44
45
class
VTK_FILTERING_EXPORT
vtkAdjacentVertexIterator
:
public
vtkObject
46
{
47
public
:
48
static
vtkAdjacentVertexIterator
*
New
();
49
vtkTypeMacro(
vtkAdjacentVertexIterator
,
vtkObject
);
50
void
PrintSelf
(ostream& os,
vtkIndent
indent);
51
53
void
Initialize(
vtkGraph
*g,
vtkIdType
v);
54
56
57
vtkGetObjectMacro(Graph,
vtkGraph
);
58
vtkGetMacro(Vertex,
vtkIdType
);
60
62
63
vtkIdType
Next()
64
{
65
vtkOutEdgeType
e = *this->Current;
66
++this->Current;
67
return
e.
Target
;
68
}
70
72
73
bool
HasNext()
74
{
75
return
this->Current != this->End;
76
}
78
79
protected
:
80
vtkAdjacentVertexIterator
();
81
~
vtkAdjacentVertexIterator
();
82
84
virtual
void
SetGraph(
vtkGraph
*graph);
85
86
vtkGraph
*
Graph
;
87
const
vtkOutEdgeType
*
Current
;
88
const
vtkOutEdgeType
*
End
;
89
vtkIdType
Vertex
;
90
91
private
:
92
vtkAdjacentVertexIterator
(
const
vtkAdjacentVertexIterator
&);
// Not implemented.
93
void
operator=(
const
vtkAdjacentVertexIterator
&);
// Not implemented.
94
};
95
96
#endif
Generated on Sun Sep 9 2012 13:03:27 for VTK by
1.8.1.2