VTK
vtkOutEdgeIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOutEdgeIterator.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 -------------------------------------------------------------------------*/
40 #ifndef vtkOutEdgeIterator_h
41 #define vtkOutEdgeIterator_h
42 
43 #include "vtkCommonDataModelModule.h" // For export macro
44 #include "vtkObject.h"
45 
46 #include "vtkGraph.h" // For edge type definitions
47 
48 class vtkGraphEdge;
49 
51 {
52 public:
53  static vtkOutEdgeIterator *New();
54  vtkTypeMacro(vtkOutEdgeIterator, vtkObject);
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58  void Initialize(vtkGraph *g, vtkIdType v);
59 
61 
62  vtkGetObjectMacro(Graph, vtkGraph);
63  vtkGetMacro(Vertex, vtkIdType);
65 
66  //BTX
68 
70  {
71  vtkOutEdgeType e = *this->Current;
72  ++this->Current;
73  return e;
74  }
75  //ETX
77 
82  vtkGraphEdge *NextGraphEdge();
83 
85 
86  bool HasNext()
87  {
88  return this->Current != this->End;
89  }
91 
92 protected:
95 
97  virtual void SetGraph(vtkGraph *graph);
98 
104 
105 private:
106  vtkOutEdgeIterator(const vtkOutEdgeIterator&); // Not implemented.
107  void operator=(const vtkOutEdgeIterator&); // Not implemented.
108 };
109 
110 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
vtkOutEdgeType Next()
Representation of a single graph edge.
Definition: vtkGraphEdge.h:38
int vtkIdType
Definition: vtkType.h:247
const vtkOutEdgeType * Current
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
const vtkOutEdgeType * End
Iterates through all outgoing edges from a vertex.
static vtkObject * New()
vtkGraphEdge * GraphEdge
#define VTKCOMMONDATAMODEL_EXPORT