Class ConstWeakArea

Inheritance Relationships

Derived Type

Class Documentation

class ConstWeakArea

used internally by RegulatoryElements to avoid cyclic dependencies.

It works conceptually similar to a std::weak_ptr. This is the immutable version of a WeakArea and returns a ConstArea when lock() is called.

Subclassed by lanelet::WeakArea

Public Types

using ConstType = ConstWeakArea
using MutableType = WeakArea
using TwoDType = ConstWeakArea
using ThreeDType = ConstWeakArea

Public Functions

ConstWeakArea() = default
inline ConstWeakArea(ConstArea area)
inline ConstArea lock() const

Obtains the original ConstArea.

Throws:

NullptrError – if the managed lanelet expired.

inline bool expired() const noexcept

tests whether the WeakArea is still valid

Protected Attributes

std::weak_ptr<const AreaData> areaData_