00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_NODING_SEGMENTSTRING_H
00022 #define GEOS_NODING_SEGMENTSTRING_H
00023
00024 #include <geos/export.h>
00025 #include <geos/noding/SegmentNodeList.h>
00026
00027 #include <vector>
00028
00029
00030 namespace geos {
00031 namespace algorithm {
00032 class LineIntersector;
00033 }
00034 }
00035
00036 namespace geos {
00037 namespace noding {
00038
00046 class GEOS_DLL SegmentString {
00047 public:
00048 typedef std::vector<const SegmentString*> ConstVect;
00049 typedef std::vector<SegmentString *> NonConstVect;
00050
00051 friend std::ostream& operator<< (std::ostream& os,
00052 const SegmentString& ss);
00053
00055
00058 SegmentString(const void* newContext)
00059 :
00060 context(newContext)
00061 {}
00062
00063 virtual ~SegmentString() {}
00064
00070 const void* getData() const { return context; }
00071
00077 void setData(const void* data) { context=data; }
00078
00079
00080 virtual unsigned int size() const=0;
00081
00082 virtual const geom::Coordinate& getCoordinate(unsigned int i) const=0;
00083
00087
00090 virtual geom::CoordinateSequence* getCoordinates() const=0;
00091
00092 virtual bool isClosed() const=0;
00093
00094 virtual std::ostream& print(std::ostream& os) const;
00095
00096 private:
00097
00098 const void* context;
00099
00100
00101 SegmentString(const SegmentString& other);
00102 SegmentString& operator=(const SegmentString& rhs);
00103 };
00104
00105 std::ostream& operator<< (std::ostream& os, const SegmentString& ss);
00106
00107 }
00108 }
00109
00110 #endif
00111