Class ConstLaneletOrArea

Class Documentation

class ConstLaneletOrArea

An object that can either refer to a lanelet or an area.

Public Functions

ConstLaneletOrArea() = default
ConstLaneletOrArea(ConstLaneletOrArea &&rhs) = default
ConstLaneletOrArea &operator=(ConstLaneletOrArea &&rhs) = default
ConstLaneletOrArea(const ConstLaneletOrArea &rhs) = default
ConstLaneletOrArea &operator=(const ConstLaneletOrArea &rhs) = default
~ConstLaneletOrArea() noexcept = default
inline ConstLaneletOrArea(ConstLanelet lanelet)
inline ConstLaneletOrArea(ConstArea area)
inline ConstLaneletOrArea &operator=(ConstLanelet lanelet)
inline ConstLaneletOrArea &operator=(ConstArea area)
inline bool isArea() const

true if this object holds an area

inline bool isLanelet() const

true if this objct holds a lanelet

inline explicit operator const ConstLanelet&() const

convert to lanelet (type is not checked)

inline explicit operator const ConstArea&() const

convert to area (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 lanelet or area

inline const AttributeMap &attributes() const

get the attributes of the lanelet or area

inline RegulatoryElementConstPtrs regulatoryElements() const
template<typename T>
inline std::vector<std::shared_ptr<const T>> regulatoryElementsAs() const
inline Optional<ConstLanelet> lanelet() const

return the managed lanelet

inline Optional<ConstArea> area() const

get the managed area

inline bool equals(const ConstLaneletOrArea &other) const

compares this lanelet or area

inline CompoundPolygon3d boundingPolygon() const

returns the outer bound if it is an area or the polygon made of the lanelet bounds if it’s a lanelet