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/export.h>
00026 #include <geos/inline.h>
00027
00028 #include <vector>
00029 #include <string>
00030
00031 namespace geos {
00032 namespace geomgraph {
00033
00054 class GEOS_DLL TopologyLocation {
00055
00056 public:
00057
00058 friend std::ostream& operator<< (std::ostream&, const TopologyLocation&);
00059
00060 TopologyLocation();
00061
00062 ~TopologyLocation();
00063
00064 TopologyLocation(const std::vector<int> &newLocation);
00065
00077 TopologyLocation(int on, int left, int right);
00078
00079 TopologyLocation(int on);
00080
00081 TopologyLocation(const TopologyLocation &gl);
00082
00083 int get(size_t posIndex) const;
00084
00088 bool isNull() const;
00089
00093 bool isAnyNull() const;
00094
00095 bool isEqualOnSide(const TopologyLocation &le, int locIndex) const;
00096
00097 bool isArea() const;
00098
00099 bool isLine() const;
00100
00101 void flip();
00102
00103 void setAllLocations(int locValue);
00104
00105 void setAllLocationsIfNull(int locValue);
00106
00107 void setLocation(size_t locIndex, int locValue);
00108
00109 void setLocation(int locValue);
00110
00112 const std::vector<int> &getLocations() const;
00113
00114 void setLocations(int on, int left, int right);
00115
00116 bool allPositionsEqual(int loc) const;
00117
00122 void merge(const TopologyLocation &gl);
00123
00124 std::string toString() const;
00125
00126 private:
00127
00128 std::vector<int> location;
00129 };
00130
00131 std::ostream& operator<< (std::ostream&, const TopologyLocation&);
00132
00133 }
00134 }
00135
00136
00137
00138
00139
00140 #endif // ifndef GEOS_GEOMGRAPH_TOPOLOGYLOCATION_H
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157