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 "vtkObject.h"
44 
45 #include "vtkGraph.h" // For edge type definitions
46 
47 class vtkGraphEdge;
48 
50 {
51 public:
52  static vtkOutEdgeIterator *New();
53  vtkTypeMacro(vtkOutEdgeIterator, vtkObject);
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57  void Initialize(vtkGraph *g, vtkIdType v);
58 
60 
61  vtkGetObjectMacro(Graph, vtkGraph);
62  vtkGetMacro(Vertex, vtkIdType);
64 
65  //BTX
67 
69  {
70  vtkOutEdgeType e = *this->Current;
71  ++this->Current;
72  return e;
73  }
74  //ETX
76 
81  vtkGraphEdge *NextGraphEdge();
82 
84 
85  bool HasNext()
86  {
87  return this->Current != this->End;
88  }
90 
91 protected:
94 
96  virtual void SetGraph(vtkGraph *graph);
97 
102  vtkGraphEdge *GraphEdge;
103 
104 private:
105  vtkOutEdgeIterator(const vtkOutEdgeIterator&); // Not implemented.
106  void operator=(const vtkOutEdgeIterator&); // Not implemented.
107 };
108 
109 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkOutEdgeType Next()
#define VTK_FILTERING_EXPORT
int vtkIdType
Definition: vtkType.h:255
const vtkOutEdgeType * Current
Base class for graph data types.
Definition: vtkGraph.h:287
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
const vtkOutEdgeType * End
Iterates through all outgoing edges from a vertex.
static vtkObject * New()
vtkGraphEdge * GraphEdge