VTK
vtkInEdgeIterator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInEdgeIterator.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 -------------------------------------------------------------------------*/
37 #ifndef __vtkInEdgeIterator_h
38 #define __vtkInEdgeIterator_h
39 
40 #include "vtkObject.h"
41 
42 #include "vtkGraph.h" // For edge type definitions
43 
44 class vtkGraphEdge;
45 
47 {
48 public:
49  static vtkInEdgeIterator *New();
50  vtkTypeMacro(vtkInEdgeIterator, vtkObject);
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 
62  //BTX
64 
66  {
67  vtkInEdgeType e = *this->Current;
68  ++this->Current;
69  return e;
70  }
71  //ETX
73 
78  vtkGraphEdge *NextGraphEdge();
79 
81 
82  bool HasNext()
83  {
84  return this->Current != this->End;
85  }
87 
88 protected:
91 
93  virtual void SetGraph(vtkGraph *graph);
94 
99  vtkGraphEdge *GraphEdge;
100 
101 private:
102  vtkInEdgeIterator(const vtkInEdgeIterator&); // Not implemented.
103  void operator=(const vtkInEdgeIterator&); // Not implemented.
104 };
105 
106 #endif
vtkInEdgeType Next()
abstract base class for most VTK objects
Definition: vtkObject.h:60
#define VTK_FILTERING_EXPORT
int vtkIdType
Definition: vtkType.h:255
vtkGraphEdge * GraphEdge
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
Iterates through all incoming edges to a vertex.
const vtkInEdgeType * End
static vtkObject * New()
const vtkInEdgeType * Current