PolygonizeDirectedEdge.h

00001 /**********************************************************************
00002  * $Id: PolygonizeDirectedEdge.h 1820 2006-09-06 16:54:23Z mloskot $
00003  *
00004  * GEOS - Geometry Engine Open Source
00005  * http://geos.refractions.net
00006  *
00007  * Copyright (C) 2006 Refractions Research Inc.
00008  * Copyright (C) 2001-2002 Vivid Solutions Inc.
00009  *
00010  * This is free software; you can redistribute and/or modify it under
00011  * the terms of the GNU Lesser General Public Licence as published
00012  * by the Free Software Foundation. 
00013  * See the COPYING file for more information.
00014  *
00015  **********************************************************************/
00016 
00017 
00018 #ifndef GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
00019 #define GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
00020 
00021 #include <geos/planargraph/DirectedEdge.h> // for inheritance
00022 
00023 // Forward declarations
00024 namespace geos {
00025         namespace geom { 
00026                 //class LineString;
00027         }
00028         namespace planargraph { 
00029                 class Node;
00030         }
00031         namespace operation { 
00032                 namespace polygonize { 
00033                         class EdgeRing;
00034                 }
00035         }
00036 }
00037 
00038 namespace geos {
00039 namespace operation { // geos::operation
00040 namespace polygonize { // geos::operation::polygonize
00041 
00049 class PolygonizeDirectedEdge: public planargraph::DirectedEdge {
00050 
00051 private:
00052 
00053         EdgeRing *edgeRing;
00054 
00055         PolygonizeDirectedEdge *next;
00056 
00057         long label;
00058 
00059 public:
00060 
00061         /*
00062          * \brief
00063          * Constructs a directed edge connecting the <code>from</code> node
00064          * to the <code>to</code> node.
00065          *
00066          * @param directionPt
00067          *    specifies this DirectedEdge's direction (given by an imaginary
00068          *    line from the <code>from</code> node to <code>directionPt</code>)
00069          *
00070          * @param edgeDirection
00071          *    whether this DirectedEdge's direction is the same as or
00072          *    opposite to that of the parent Edge (if any)
00073          */
00074         PolygonizeDirectedEdge(planargraph::Node *newFrom,
00075                         planargraph::Node *newTo,
00076                         const geom::Coordinate& newDirectionPt,
00077                         bool nEdgeDirection);
00078 
00079         /*
00080          * Returns the identifier attached to this directed edge.
00081          */
00082         long getLabel() const;
00083 
00084         /*
00085          * Attaches an identifier to this directed edge.
00086          */
00087         void setLabel(long newLabel);
00088 
00089         /*
00090          * Returns the next directed edge in the EdgeRing that this
00091          * directed edge is a member of.
00092          */
00093         PolygonizeDirectedEdge* getNext() const;
00094 
00095         /*
00096          * Sets the next directed edge in the EdgeRing that this
00097          * directed edge is a member of.
00098          */
00099         void setNext(PolygonizeDirectedEdge *newNext);
00100 
00101         /*
00102          * Returns the ring of directed edges that this directed edge is
00103          * a member of, or null if the ring has not been set.
00104          * @see #setRing(EdgeRing)
00105          */
00106         bool isInRing() const;
00107 
00108         /*
00109          * Sets the ring of directed edges that this directed edge is
00110          * a member of.
00111          */
00112         void setRing(EdgeRing *newEdgeRing);
00113 };
00114 } // namespace geos::operation::polygonize
00115 } // namespace geos::operation
00116 } // namespace geos
00117 
00118 #endif // GEOS_OP_POLYGONIZE_POLYGONIZEDIRECTEDEDGE_H
00119 
00120 /**********************************************************************
00121  * $Log$
00122  * Revision 1.1  2006/03/22 11:19:06  strk
00123  * opPolygonize.h headers split.
00124  *
00125  **********************************************************************/

Generated on Fri Mar 27 04:52:57 2009 for GEOS by  doxygen 1.5.4