GEOS 3.2.2
|
00001 /********************************************************************** 00002 * $Id: Edge.h 2556 2009-06-06 22:22:28Z strk $ 00003 * 00004 * GEOS - Geometry Engine Open Source 00005 * http://geos.refractions.net 00006 * 00007 * Copyright (C) 2001-2002 Vivid Solutions Inc. 00008 * Copyright (C) 2005-2006 Refractions Research 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 #ifndef GEOS_PLANARGRAPH_EDGE_H 00018 #define GEOS_PLANARGRAPH_EDGE_H 00019 00020 #include <geos/export.h> 00021 00022 #include <geos/planargraph/GraphComponent.h> // for inheritance 00023 00024 #include <vector> // for typedefs 00025 #include <set> // for typedefs 00026 #include <iosfwd> // ostream 00027 00028 // Forward declarations 00029 namespace geos { 00030 namespace planargraph { 00031 class DirectedEdgeStar; 00032 class DirectedEdge; 00033 class Edge; 00034 class Node; 00035 } 00036 } 00037 00038 namespace geos { 00039 namespace planargraph { // geos.planargraph 00040 00050 class GEOS_DLL Edge: public GraphComponent { 00051 00052 public: 00053 00054 friend std::ostream& operator<< (std::ostream& os, const Node&); 00055 00057 typedef std::set<const Edge *> ConstSet; 00058 00060 typedef std::set<Edge *> NonConstSet; 00061 00063 typedef std::vector<Edge *> NonConstVect; 00064 00066 typedef std::vector<const Edge *> ConstVect; 00067 00068 protected: 00069 00071 std::vector<DirectedEdge*> dirEdge; 00072 00079 public: 00080 00088 Edge(): dirEdge() {} 00089 00096 Edge(DirectedEdge *de0, DirectedEdge *de1) 00097 : 00098 dirEdge() 00099 { 00100 setDirectedEdges(de0, de1); 00101 } 00102 00110 void setDirectedEdges(DirectedEdge *de0, DirectedEdge *de1); 00111 00116 DirectedEdge* getDirEdge(int i); 00117 00123 DirectedEdge* getDirEdge(Node *fromNode); 00124 00129 Node* getOppositeNode(Node *node); 00130 }; 00131 00133 std::ostream& operator<<(std::ostream& os, const Edge& n); 00134 00135 00136 00138 //typedef Edge planarEdge; 00139 00140 } // namespace geos::planargraph 00141 } // namespace geos 00142 00143 #endif // GEOS_PLANARGRAPH_EDGE_H 00144 00145 /********************************************************************** 00146 * $Log$ 00147 * Revision 1.1 2006/03/21 21:42:54 strk 00148 * planargraph.h header split, planargraph:: classes renamed to match JTS symbols 00149 * 00150 **********************************************************************/ 00151