00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GEOS_GEOMGRAPH_EDGELIST_H
00019 #define GEOS_GEOMGRAPH_EDGELIST_H
00020
00021 #include <vector>
00022 #include <string>
00023 #include <iostream>
00024
00025 #include <geos/indexQuadtree.h>
00026
00027 #include <geos/inline.h>
00028
00029
00030 namespace geos {
00031 namespace index {
00032 class SpatialIndex;
00033 }
00034 namespace geomgraph {
00035 class Edge;
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace geomgraph {
00041
00042 class EdgeList {
00043
00044 private:
00045
00046 std::vector<Edge*> edges;
00047
00057 geos::index::SpatialIndex* index;
00058
00059 public:
00060 friend std::ostream& operator<< (std::ostream& os, const EdgeList& el);
00061
00062 EdgeList()
00063 :
00064 edges(),
00065 index(new geos::index::quadtree::Quadtree())
00066 {}
00067
00068 virtual ~EdgeList() { delete index; }
00069
00073 void add(Edge *e);
00074
00075 void addAll(const std::vector<Edge*> &edgeColl);
00076
00077 std::vector<Edge*> &getEdges() { return edges; }
00078
00079 Edge* findEqualEdge(Edge* e);
00080
00081 Edge* get(int i);
00082
00083 int findEdgeIndex(Edge *e);
00084
00085 std::string print();
00086
00087 };
00088
00089 std::ostream& operator<< (std::ostream& os, const EdgeList& el);
00090
00091
00092 }
00093 }
00094
00095
00096
00097
00098
00099 #endif // ifndef GEOS_GEOMGRAPH_EDGELIST_H
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113