Tulip  4.1.0
Better Visualization Through Research
 All Classes Files Functions Variables Enumerations Enumerator Properties Groups Pages
FaceIterator.h
1 /*
2  *
3  * This file is part of Tulip (www.tulip-software.org)
4  *
5  * Authors: David Auber and the Tulip development Team
6  * from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
7  *
8  * Tulip is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *
13  * Tulip is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU General Public License for more details.
17  *
18  */
19 ///@cond DOXYGEN_HIDDEN
20 
21 #ifndef FACEITERATOR2_H
22 #define FACEITERATOR2_H
23 
24 #include <list>
25 #include <tulip/PlanarConMap.h>
26 
27 
28 #ifndef DOXYGEN_NOTFOR_DEVEL
29 //============================================================
30 /// Face iterator for PlanarConMap
31 namespace tlp {
32 
33 class FaceIterator : public Iterator<Face> {
34 public:
35  FaceIterator(PlanarConMap* m);
36  virtual ~FaceIterator() {}
37 
38  Face next();
39  bool hasNext();
40 
41 private:
42  unsigned int i;
43  PlanarConMap* mgraph;
44 };
45 
46 //============================================================
47 /// Adjacente Face iterator for PlanarConMap
48 class FaceAdjIterator : public Iterator<Face> {
49 public:
50  FaceAdjIterator(PlanarConMap* m, const node n);
51  virtual ~FaceAdjIterator() {}
52 
53  Face next();
54  bool hasNext();
55 
56 private:
57  std::vector<Face> facesAdj;
58  unsigned int i;
59 };
60 
61 //============================================================
62 /// Node of face iterator for PlanarConMap
63 class NodeFaceIterator : public Iterator<node> {
64 public :
65  NodeFaceIterator(PlanarConMap *m, const Face );
66  virtual ~NodeFaceIterator() {}
67 
68  node next();
69  bool hasNext();
70 
71 private :
72  /** contains the set of computed nodes */
73  std::vector<node> nodes;
74  unsigned int i;
75 };
76 
77 
78 //============================================================
79 /// Edge of face iterator for PlanarConMap
80 class EdgeFaceIterator : public Iterator<edge> {
81 public :
82  EdgeFaceIterator(PlanarConMap *m, const Face );
83  virtual ~EdgeFaceIterator() {}
84 
85  edge next();
86  bool hasNext();
87 
88 private :
89  /** reference on the current face */
90  std::vector<edge> ve;
91  unsigned int i;
92 };
93 
94 }
95 #endif
96 #endif
97 ///@endcond