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 #ifdef _MSC_VER
00032 #pragma warning(push)
00033 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00034 #endif
00035
00036 namespace geos {
00037 namespace geomgraph {
00038
00059 class GEOS_DLL TopologyLocation {
00060
00061 public:
00062
00063 friend std::ostream& operator<< (std::ostream&, const TopologyLocation&);
00064
00065 TopologyLocation();
00066
00067 ~TopologyLocation();
00068
00069 TopologyLocation(const std::vector<int> &newLocation);
00070
00082 TopologyLocation(int on, int left, int right);
00083
00084 TopologyLocation(int on);
00085
00086 TopologyLocation(const TopologyLocation &gl);
00087
00088 int get(std::size_t posIndex) const;
00089
00093 bool isNull() const;
00094
00098 bool isAnyNull() const;
00099
00100 bool isEqualOnSide(const TopologyLocation &le, int locIndex) const;
00101
00102 bool isArea() const;
00103
00104 bool isLine() const;
00105
00106 void flip();
00107
00108 void setAllLocations(int locValue);
00109
00110 void setAllLocationsIfNull(int locValue);
00111
00112 void setLocation(std::size_t locIndex, int locValue);
00113
00114 void setLocation(int locValue);
00115
00117 const std::vector<int> &getLocations() const;
00118
00119 void setLocations(int on, int left, int right);
00120
00121 bool allPositionsEqual(int loc) const;
00122
00127 void merge(const TopologyLocation &gl);
00128
00129 std::string toString() const;
00130
00131 private:
00132
00133 std::vector<int> location;
00134 };
00135
00136 std::ostream& operator<< (std::ostream&, const TopologyLocation&);
00137
00138 }
00139 }
00140
00141
00142
00143
00144
00145 #ifdef _MSC_VER
00146 #pragma warning(pop)
00147 #endif
00148
00149 #endif // ifndef GEOS_GEOMGRAPH_TOPOLOGYLOCATION_H
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166