Class ConstWeakLanelet

Inheritance Relationships

Derived Type

Class Documentation

class ConstWeakLanelet

Used internally by RegulatoryElements to avoid cyclic dependencies. Conceptually similar to a std::weak_ptr.

Subclassed by lanelet::WeakLanelet

Public Types

using ConstType = ConstWeakLanelet
using MutableType = WeakLanelet
using TwoDType = ConstWeakLanelet
using ThreeDType = ConstWeakLanelet

Public Functions

ConstWeakLanelet() = default
inline ConstWeakLanelet(const ConstLanelet &llet)
inline ConstLanelet lock() const

Obtains the original ConstLanelet.

Throws:

NullptrError – if the managed lanelet expired.

inline bool expired() const noexcept

tests whether the WeakLanelet is still valid

Protected Attributes

std::weak_ptr<const LaneletData> laneletData_
bool inverted_ = {false}