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 "vtkCommonDataModelModule.h" // For export macro
41 #include "vtkObject.h"
42 
43 #include "vtkGraph.h" // For edge type definitions
44 
45 class vtkGraphEdge;
46 
48 {
49 public:
50  static vtkInEdgeIterator *New();
51  vtkTypeMacro(vtkInEdgeIterator, vtkObject);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55  void Initialize(vtkGraph *g, vtkIdType v);
56 
58 
59  vtkGetObjectMacro(Graph, vtkGraph);
60  vtkGetMacro(Vertex, vtkIdType);
62 
63  //BTX
65 
67  {
68  vtkInEdgeType e = *this->Current;
69  ++this->Current;
70  return e;
71  }
72  //ETX
74 
79  vtkGraphEdge *NextGraphEdge();
80 
82 
83  bool HasNext()
84  {
85  return this->Current != this->End;
86  }
88 
89 protected:
92 
94  virtual void SetGraph(vtkGraph *graph);
95 
101 
102 private:
103  vtkInEdgeIterator(const vtkInEdgeIterator&); // Not implemented.
104  void operator=(const vtkInEdgeIterator&); // Not implemented.
105 };
106 
107 #endif
vtkInEdgeType Next()
abstract base class for most VTK objects
Definition: vtkObject.h:61
Representation of a single graph edge.
Definition: vtkGraphEdge.h:38
int vtkIdType
Definition: vtkType.h:247
vtkGraphEdge * GraphEdge
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
Iterates through all incoming edges to a vertex.
const vtkInEdgeType * End
static vtkObject * New()
const vtkInEdgeType * Current
#define VTKCOMMONDATAMODEL_EXPORT