Template Class LineStringOrPolygonBase

Class Documentation

template<typename LineStringT, typename PolygonT>
class LineStringOrPolygonBase

Base class for objects that can either refer to linestrings or polygons.

Public Functions

LineStringOrPolygonBase() = default
LineStringOrPolygonBase(LineStringOrPolygonBase &&rhs) = default
LineStringOrPolygonBase &operator=(LineStringOrPolygonBase &&rhs) = default
LineStringOrPolygonBase(const LineStringOrPolygonBase &rhs) = default
LineStringOrPolygonBase &operator=(const LineStringOrPolygonBase &rhs) = default
~LineStringOrPolygonBase() noexcept = default
inline LineStringOrPolygonBase(LineStringT linestring)
inline LineStringOrPolygonBase(PolygonT polygon)
inline LineStringOrPolygonBase &operator=(LineStringT linestring)
inline LineStringOrPolygonBase &operator=(PolygonT poly)
inline bool isPolygon() const

true if this object holds an polygon

inline bool isLineString() const

true if this objct holds a lineString

inline explicit operator const LineStringT&() const

convert to linestring (type is not checked)

inline explicit operator const PolygonT&() const

convert to polygon (type is not checked)

template<typename VisitorT>
inline decltype(auto) applyVisitor(VisitorT visitor) const

apply a generic visitor

inline Id id() const

get the id of the linestring or polygon

inline const AttributeMap &attributes() const

get the attributes of the linestring or polygon

inline Optional<LineStringT> lineString() const

return the managed linestring

inline Optional<PolygonT> polygon() const

get the managed polygon

inline bool equals(const LineStringOrPolygonBase &other) const

Protected Attributes

boost::variant<LineStringT, PolygonT> lsOrPoly_