00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GEOS_GEOMGRAPH_TOPOLOGYLOCATION_H
00023 #define GEOS_GEOMGRAPH_TOPOLOGYLOCATION_H
00024
00025 #include <geos/inline.h>
00026
00027 #include <vector>
00028 #include <string>
00029
00030 namespace geos {
00031 namespace geomgraph {
00032
00053 class TopologyLocation {
00054
00055 public:
00056
00057 friend std::ostream& operator<< (std::ostream&, const TopologyLocation&);
00058
00059 TopologyLocation();
00060
00061 ~TopologyLocation();
00062
00063 TopologyLocation(const std::vector<int> &newLocation);
00064
00076 TopologyLocation(int on, int left, int right);
00077
00078 TopologyLocation(int on);
00079
00080 TopologyLocation(const TopologyLocation &gl);
00081
00082 int get(size_t posIndex) const;
00083
00087 bool isNull() const;
00088
00092 bool isAnyNull() const;
00093
00094 bool isEqualOnSide(const TopologyLocation &le, int locIndex) const;
00095
00096 bool isArea() const;
00097
00098 bool isLine() const;
00099
00100 void flip();
00101
00102 void setAllLocations(int locValue);
00103
00104 void setAllLocationsIfNull(int locValue);
00105
00106 void setLocation(size_t locIndex, int locValue);
00107
00108 void setLocation(int locValue);
00109
00111 const std::vector<int> &getLocations() const;
00112
00113 void setLocations(int on, int left, int right);
00114
00115 bool allPositionsEqual(int loc) const;
00116
00121 void merge(const TopologyLocation &gl);
00122
00123 std::string toString() const;
00124
00125 private:
00126
00127 std::vector<int> location;
00128 };
00129
00130 std::ostream& operator<< (std::ostream&, const TopologyLocation&);
00131
00132 }
00133 }
00134
00135
00136
00137
00138
00139 #endif // ifndef GEOS_GEOMGRAPH_TOPOLOGYLOCATION_H
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156