GEOS: DirectedEdge.h Source File

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

# DirectedEdge.h

    00001 /**********************************************************************
    00002  * $Id: DirectedEdge.h 2557 2009-06-08 09:30:55Z strk $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2005-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  * Last port: geomgraph/DirectedEdge.java rev. 1.5 (JTS-1.10)
    00018  *
    00019  **********************************************************************/
    00020
    00021
    00022 #ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
    00023 #define GEOS_GEOMGRAPH_DIRECTEDEDGE_H
    00024
    00025 #include <geos/export.h>
    00026 #include <string>
    00027
    00028 #include <geos/geomgraph/EdgeEnd.h> // for inheritance
    00029
    00030 #include <geos/inline.h>
    00031
    00032 // Forward declarations
    00033 namespace geos {
    00034         namespace geomgraph {
    00035                 class Edge;
    00036                 class EdgeRing;
    00037         }
    00038 }
    00039
    00040 namespace geos {
    00041 namespace geomgraph { // geos.geomgraph
    00042
    00044 class GEOS_DLL DirectedEdge: public EdgeEnd {
    00045
    00046 public:
    00047
    00054         static int depthFactor(int currLocation, int nextLocation);
    00055
    00056         //DirectedEdge();
    00057         //virtual ~DirectedEdge();
    00058
    00059         DirectedEdge(Edge *newEdge, bool newIsForward);
    00060
    00061         // this is no different from Base class, no need to override
    00062         //Edge* getEdge();
    00063
    00064         void setInResult(bool newIsInResult);
    00065
    00066         bool isInResult();
    00067
    00068         bool isVisited();
    00069
    00070         void setVisited(bool newIsVisited);
    00071
    00072         void setEdgeRing(EdgeRing *newEdgeRing);
    00073
    00074         EdgeRing* getEdgeRing();
    00075
    00076         void setMinEdgeRing(EdgeRing *newMinEdgeRing);
    00077
    00078         EdgeRing* getMinEdgeRing();
    00079
    00080         int getDepth(int position);
    00081
    00082         void setDepth(int position, int newDepth);
    00083
    00084         int getDepthDelta();
    00085
    00087         //
    00091         void setVisitedEdge(bool newIsVisited);
    00092
    00093
    00101         DirectedEdge* getSym();
    00102
    00103         bool isForward();
    00104
    00105         void setSym(DirectedEdge *de);
    00106
    00107         DirectedEdge* getNext();
    00108
    00109         void setNext(DirectedEdge *newNext);
    00110
    00111         DirectedEdge* getNextMin();
    00112
    00113         void setNextMin(DirectedEdge *newNextMin);
    00114
    00123         bool isLineEdge();
    00124
    00134         bool isInteriorAreaEdge();
    00135
    00143         void setEdgeDepths(int position, int newDepth);
    00144
    00145         std::string print();
    00146
    00147         std::string printEdge();
    00148
    00149 protected:
    00150
    00151         bool isForwardVar;
    00152
    00153 private:
    00154
    00155         bool isInResultVar;
    00156
    00157         bool isVisitedVar;
    00158
    00160         DirectedEdge *sym;
    00161
    00163         DirectedEdge *next;
    00164
    00166         DirectedEdge *nextMin;
    00167
    00169         EdgeRing *edgeRing;
    00170
    00172         EdgeRing *minEdgeRing;
    00173
    00178         int depth[3];
    00179
    00181         void computeDirectedLabel();
    00182 };
    00183
    00184 } // namespace geos.geomgraph
    00185 } // namespace geos
    00186
    00187 #ifdef GEOS_INLINE
    00188 # include "geos/geomgraph/DirectedEdge.inl"
    00189 #endif
    00190
    00191 #endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
    00192
    00193 /**********************************************************************
    00194  * $Log$
    00195  * Revision 1.5  2006/06/14 14:32:20  strk
    00196  * EdgeEnd::getEdge() made non-virtual and inlined.
    00197  *
    00198  * Revision 1.4  2006/05/04 13:38:13  strk
    00199  * doxygen comments cleanup
    00200  *
    00201  * Revision 1.3  2006/03/24 09:52:41  strk
    00202  * USE_INLINE => GEOS_INLINE
    00203  *
    00204  * Revision 1.2  2006/03/15 15:27:23  strk
    00205  * cleanups
    00206  *
    00207  * Revision 1.1  2006/03/09 16:46:49  strk
    00208  * geos::geom namespace definition, first pass at headers split
    00209  *
    00210  **********************************************************************/
    00211