VTK
vtkEdgeListIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkEdgeListIterator.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 -------------------------------------------------------------------------*/
43 #ifndef __vtkEdgeListIterator_h
44 #define __vtkEdgeListIterator_h
45 
46 #include "vtkObject.h"
47 
48 class vtkGraph;
49 class vtkGraphEdge;
50 //BTX
51 struct vtkEdgeType;
52 struct vtkOutEdgeType;
53 //ETX
55 {
56 public:
57  static vtkEdgeListIterator *New();
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
61  vtkGetObjectMacro(Graph, vtkGraph);
62  virtual void SetGraph(vtkGraph *graph);
63 
64  //BTX
66 
67  vtkEdgeType Next();
68  //ETX
70 
75  vtkGraphEdge *NextGraphEdge();
76 
78  bool HasNext();
79 
80 protected:
83 
84  void Increment();
85 
86  vtkGraph *Graph;
87  const vtkOutEdgeType *Current;
88  const vtkOutEdgeType *End;
90  bool Directed;
91  vtkGraphEdge *GraphEdge;
92 
93 private:
94  vtkEdgeListIterator(const vtkEdgeListIterator&); // Not implemented.
95  void operator=(const vtkEdgeListIterator&); // Not implemented.
96 };
97 
98 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
#define VTK_FILTERING_EXPORT
const vtkOutEdgeType * Current
Iterates through all edges in a graph.
int vtkIdType
Definition: vtkType.h:255
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkGraphEdge * GraphEdge
const vtkOutEdgeType * End
static vtkObject * New()