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

# DirectedEdge.h

    00001 /**********************************************************************
    00002  * $Id: DirectedEdge.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) 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
    00018 #ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
    00019 #define GEOS_GEOMGRAPH_DIRECTEDEDGE_H
    00020
    00021 #include <string>
    00022
    00023 #include <geos/geomgraph/EdgeEnd.h> // for inheritance
    00024
    00025 #include <geos/inline.h>
    00026
    00027 // Forward declarations
    00028 namespace geos {
    00029         namespace geomgraph {
    00030                 class Edge;
    00031                 class EdgeRing;
    00032         }
    00033 }
    00034
    00035 namespace geos {
    00036 namespace geomgraph { // geos.geomgraph
    00037
    00039 class DirectedEdge: public EdgeEnd {
    00040
    00041 public:
    00042
    00049         static int depthFactor(int currLocation, int nextLocation);
    00050
    00051         //DirectedEdge();
    00052         //virtual ~DirectedEdge();
    00053
    00054         DirectedEdge(Edge *newEdge, bool newIsForward);
    00055
    00056         // this is no different from Base class, no need to override
    00057         //Edge* getEdge();
    00058
    00059         void setInResult(bool newIsInResult);
    00060
    00061         bool isInResult();
    00062
    00063         bool isVisited();
    00064
    00065         void setVisited(bool newIsVisited);
    00066
    00067         void setEdgeRing(EdgeRing *newEdgeRing);
    00068
    00069         EdgeRing* getEdgeRing();
    00070
    00071         void setMinEdgeRing(EdgeRing *newMinEdgeRing);
    00072
    00073         EdgeRing* getMinEdgeRing();
    00074
    00075         int getDepth(int position);
    00076
    00077         void setDepth(int position, int newDepth);
    00078
    00079         int getDepthDelta();
    00080
    00082         //
    00086         void setVisitedEdge(bool newIsVisited);
    00087
    00088
    00096         DirectedEdge* getSym();
    00097
    00098         bool isForward();
    00099
    00100         void setSym(DirectedEdge *de);
    00101
    00102         DirectedEdge* getNext();
    00103
    00104         void setNext(DirectedEdge *newNext);
    00105
    00106         DirectedEdge* getNextMin();
    00107
    00108         void setNextMin(DirectedEdge *newNextMin);
    00109
    00118         bool isLineEdge();
    00119
    00129         bool isInteriorAreaEdge();
    00130
    00138         void setEdgeDepths(int position, int newDepth);
    00139
    00140         std::string print();
    00141
    00142         std::string printEdge();
    00143
    00144 protected:
    00145
    00146         bool isForwardVar;
    00147
    00148 private:
    00149
    00150         bool isInResultVar;
    00151
    00152         bool isVisitedVar;
    00153
    00155         DirectedEdge *sym;
    00156
    00158         DirectedEdge *next;
    00159
    00161         DirectedEdge *nextMin;
    00162
    00164         EdgeRing *edgeRing;
    00165
    00167         EdgeRing *minEdgeRing;
    00168
    00173         int depth[3];
    00174
    00176         void computeDirectedLabel();
    00177 };
    00178
    00179 } // namespace geos.geomgraph
    00180 } // namespace geos
    00181
    00182 #ifdef GEOS_INLINE
    00183 # include "geos/geomgraph/DirectedEdge.inl"
    00184 #endif
    00185
    00186 #endif // ifndef GEOS_GEOMGRAPH_DIRECTEDEDGE_H
    00187
    00188 /**********************************************************************
    00189  * $Log$
    00190  * Revision 1.5  2006/06/14 14:32:20  strk
    00191  * EdgeEnd::getEdge() made non-virtual and inlined.
    00192  *
    00193  * Revision 1.4  2006/05/04 13:38:13  strk
    00194  * doxygen comments cleanup
    00195  *
    00196  * Revision 1.3  2006/03/24 09:52:41  strk
    00197  * USE_INLINE => GEOS_INLINE
    00198  *
    00199  * Revision 1.2  2006/03/15 15:27:23  strk
    00200  * cleanups
    00201  *
    00202  * Revision 1.1  2006/03/09 16:46:49  strk
    00203  * geos::geom namespace definition, first pass at headers split
    00204  *
    00205  **********************************************************************/
    00206