GEOS  3.3.3
PolygonizeDirectedEdge.h
1 /**********************************************************************
2  * $Id: PolygonizeDirectedEdge.h 2567 2009-06-08 16:58:42Z strk $
3  *
4  * GEOS - Geometry Engine Open Source
5  * http://geos.refractions.net
6  *
7  * Copyright (C) 2006 Refractions Research Inc.
8  * Copyright (C) 2001-2002 Vivid Solutions Inc.
9  *
10  * This is free software; you can redistribute and/or modify it under
11  * the terms of the GNU Lesser General Public Licence as published
12  * by the Free Software Foundation.
13  * See the COPYING file for more information.
14  *
15  **********************************************************************
16  *
17  * Last port: operation/polygonize/PolygonizeDirectedEdge.java rev. 1.4 (JTS-1.10)
18  *
19  **********************************************************************/
20 
21 
22 #ifndef GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
23 #define GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
24 
25 #include <geos/export.h>
26 
27 #include <geos/planargraph/DirectedEdge.h> // for inheritance
28 
29 // Forward declarations
30 namespace geos {
31  namespace geom {
32  //class LineString;
33  }
34  namespace planargraph {
35  class Node;
36  }
37  namespace operation {
38  namespace polygonize {
39  class EdgeRing;
40  }
41  }
42 }
43 
44 namespace geos {
45 namespace operation { // geos::operation
46 namespace polygonize { // geos::operation::polygonize
47 
56 
57 private:
58 
59  EdgeRing *edgeRing;
60 
62 
63  long label;
64 
65 public:
66 
67  /*
68  * \brief
69  * Constructs a directed edge connecting the <code>from</code> node
70  * to the <code>to</code> node.
71  *
72  * @param directionPt
73  * specifies this DirectedEdge's direction (given by an imaginary
74  * line from the <code>from</code> node to <code>directionPt</code>)
75  *
76  * @param edgeDirection
77  * whether this DirectedEdge's direction is the same as or
78  * opposite to that of the parent Edge (if any)
79  */
81  planargraph::Node *newTo,
82  const geom::Coordinate& newDirectionPt,
83  bool nEdgeDirection);
84 
85  /*
86  * Returns the identifier attached to this directed edge.
87  */
88  long getLabel() const;
89 
90  /*
91  * Attaches an identifier to this directed edge.
92  */
93  void setLabel(long newLabel);
94 
95  /*
96  * Returns the next directed edge in the EdgeRing that this
97  * directed edge is a member of.
98  */
99  PolygonizeDirectedEdge* getNext() const;
100 
101  /*
102  * Sets the next directed edge in the EdgeRing that this
103  * directed edge is a member of.
104  */
105  void setNext(PolygonizeDirectedEdge *newNext);
106 
107  /*
108  * Returns the ring of directed edges that this directed edge is
109  * a member of, or null if the ring has not been set.
110  * @see #setRing(EdgeRing)
111  */
112  bool isInRing() const;
113 
114  /*
115  * Sets the ring of directed edges that this directed edge is
116  * a member of.
117  */
118  void setRing(EdgeRing *newEdgeRing);
119 };
120 } // namespace geos::operation::polygonize
121 } // namespace geos::operation
122 } // namespace geos
123 
124 #endif // GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
125 
126 /**********************************************************************
127  * $Log$
128  * Revision 1.1 2006/03/22 11:19:06 strk
129  * opPolygonize.h headers split.
130  *
131  **********************************************************************/