Public Types | Public Member Functions | Protected Attributes | List of all members
lanelet::ConstWeakArea Class Reference

used internally by RegulatoryElements to avoid cyclic dependencies. More...

#include <Area.h>

Inheritance diagram for lanelet::ConstWeakArea:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

 ConstWeakArea ()=default
 
 ConstWeakArea (ConstArea area)
 
bool expired () const noexcept
 tests whether the WeakArea is still valid More...
 
ConstArea lock () const
 Obtains the original ConstArea. More...
 

Protected Attributes

std::weak_ptr< const AreaDataareaData_
 

Detailed Description

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.

Definition at line 271 of file primitives/Area.h.

Member Typedef Documentation

◆ ConstType

Definition at line 273 of file primitives/Area.h.

◆ MutableType

Definition at line 274 of file primitives/Area.h.

◆ ThreeDType

Definition at line 276 of file primitives/Area.h.

◆ TwoDType

Definition at line 275 of file primitives/Area.h.

Constructor & Destructor Documentation

◆ ConstWeakArea() [1/2]

lanelet::ConstWeakArea::ConstWeakArea ( )
default

◆ ConstWeakArea() [2/2]

lanelet::ConstWeakArea::ConstWeakArea ( ConstArea  area)
inline

Definition at line 278 of file primitives/Area.h.

Member Function Documentation

◆ expired()

bool lanelet::ConstWeakArea::expired ( ) const
inlinenoexcept

tests whether the WeakArea is still valid

Definition at line 288 of file primitives/Area.h.

◆ lock()

ConstArea lanelet::ConstWeakArea::lock ( ) const
inline

Obtains the original ConstArea.

Exceptions
NullptrErrorif the managed lanelet expired.

Definition at line 285 of file primitives/Area.h.

Member Data Documentation

◆ areaData_

std::weak_ptr<const AreaData> lanelet::ConstWeakArea::areaData_
protected

Definition at line 291 of file primitives/Area.h.


The documentation for this class was generated from the following file:


lanelet2_core
Author(s): Fabian Poggenhans
autogenerated on Thu Mar 6 2025 03:25:52