20 #ifndef GEOS_GEOM_COORDINATELIST_H 21 #define GEOS_GEOM_COORDINATELIST_H 32 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 59 typedef std::list<Coordinate>::iterator
iterator;
62 friend std::ostream&
operator<< (std::ostream& os,
76 coords(v.begin(), v.end())
95 return coords.empty();
101 return coords.begin();
113 return coords.begin();
138 if(!allowRepeated && pos != coords.begin()) {
145 return coords.insert(pos, c);
151 return coords.insert(pos, c);
157 return coords.erase(pos);
161 erase(iterator first, iterator last)
163 return coords.erase(first, last);
166 std::unique_ptr<Coordinate::Vect>
170 ret->assign(coords.begin(), coords.end());
176 if(!coords.empty() && !(*(coords.begin())).equals(*(coords.rbegin()))) {
178 coords.insert(coords.end(), c);
198 if(it != cl.
begin()) {
215 #endif // ndef GEOS_GEOM_COORDINATELIST_H iterator insert(iterator pos, const Coordinate &c, bool allowRepeated)
Inserts the specified coordinate at the specified position in this list.
Coordinate is the lightweight class used to store coordinates.
iterator erase(iterator first, iterator last)
std::list< Coordinate > coords
std::unique_ptr< Coordinate::Vect > toCoordinateArray() const
CoordinateList(const std::vector< Coordinate > &v)
Constructs a new list from an array of Coordinates, allowing repeated points.
std::ostream & operator<<(std::ostream &os, const Coordinate &c)
Output function.
Basic namespace for all GEOS functionalities.
std::list< Coordinate >::iterator iterator
std::vector< Coordinate > Vect
A vector of Coordinate objects (real object, not pointers)
A list of Coordinates, which may be set to prevent repeated coordinates from occuring in the list...
const_iterator end() const
const_iterator begin() const
iterator erase(iterator pos)
bool equals2D(const Coordinate &other) const
std::list< Coordinate >::const_iterator const_iterator
iterator insert(iterator pos, const Coordinate &c)