Public Types | Public Member Functions | Protected Types | Protected Member Functions | List of all members
lanelet::LineStringImpl< ConstLineStringT > Class Template Reference

Implementation template class that is common to all non-const types. More...

#include <LineString.h>

Inheritance diagram for lanelet::LineStringImpl< ConstLineStringT >:
Inheritance graph
[legend]

Public Types

using iterator = internal::SelectLsIteratorT< PointType >
 
using PointType = typename Base::MutablePointType
 
using SegmentType = typename Base::SegmentType
 
- Public Types inherited from lanelet::Primitive< ConstLineStringT >
using DataType = typename ConstLineStringT ::DataType
 

Public Member Functions

PointTypeback ()
 get a reference to the last element if it exists More...
 
iterator begin ()
 mutable iterator for the elements of this vector. More...
 
void clear ()
 
iterator end ()
 mutable iterator to the end of the elements of this vector. More...
 
iterator erase (iterator position)
 Removes point, returns iterator to the next point. More...
 
PointTypefront ()
 get a refernce to the first element (make sure it exists) More...
 
iterator insert (iterator position, const PointType &point)
 Inserts an element at a specific position. More...
 
template<typename InIter >
iterator insert (iterator position, InIter start, InIter end)
 Inserts an range of elements at a specific position. More...
 
 LineStringImpl ()=default
 
template<typename OtherT >
 LineStringImpl (const LineStringImpl< OtherT > &other)
 Construct from other (mutable!) LineStrings. More...
 
 LineStringImpl (const std::shared_ptr< const LineStringData > &, bool inverted)=delete
 
 LineStringImpl (const std::shared_ptr< LineStringData > &data, bool inverted)
 Construct from linestring data. More...
 
LineStringImploperator= (std::vector< Point3d > &&rhs)
 Move assign from a normal vector. Id and attributes stay unchanged. More...
 
LineStringImploperator= (std::vector< PointType > rhs)
 Copy assign from a normal vector. The Id of this object is unchanged. More...
 
PointTypeoperator[] (size_t idx)
 access element at specific position More...
 
void pop_back ()
 removes element from the end More...
 
void push_back (const PointType &point)
 inserts a new element at the end More...
 
void reserve (size_t num)
 request a change in capacity More...
 
void resize (size_t num)
 
SegmentType segment (size_t idx) noexcept
 returns the n-th segment. If n equals size() -1, the segment from back() to front() is returned. More...
 
- Public Member Functions inherited from lanelet::Primitive< ConstLineStringT >
AttributeMapattributes () noexcept
 get the attributes in a mutable way More...
 
 Primitive ()=default
 
 Primitive (const Primitive< OtherT > &rhs)
 Construct from another primitive. Only works if both share the same. More...
 
 Primitive (const std::shared_ptr< const DataType > &)=delete
 
 Primitive (const std::shared_ptr< DataType > &data)
 Construct a new primitive from shared_ptr to its data. More...
 
void setAttribute (AttributeName name, const Attribute &attribute)
 set or overwrite an attribute (enum version) More...
 
void setAttribute (const std::string &name, const Attribute &attribute)
 set or overwrite an attribute More...
 
void setId (Id id) noexcept
 set a new id for this primitive More...
 

Protected Types

using Base = Primitive< ConstLineStringT >
 

Protected Member Functions

 LineStringImpl (const LineStringImpl &rhs)=default
 
 LineStringImpl (LineStringImpl &&rhs) noexcept=default
 
LineStringImploperator= (const LineStringImpl &rhs)=default
 
LineStringImploperator= (LineStringImpl &&rhs) noexcept=default
 
Points3dpoints ()
 
 ~LineStringImpl () noexcept=default
 
- Protected Member Functions inherited from lanelet::Primitive< ConstLineStringT >
std::shared_ptr< DataTypedata () const
 
Primitiveoperator= (const Primitive &rhs) noexcept
 
Primitiveoperator= (Primitive &&rhs) noexcept
 
 Primitive (const Primitive &rhs) noexcept
 
 Primitive (Primitive &&rhs) noexcept
 
 ~Primitive () noexcept=default
 

Additional Inherited Members

- Static Public Attributes inherited from lanelet::Primitive< ConstLineStringT >
static constexpr bool IsConst
 

Detailed Description

template<typename ConstLineStringT>
class lanelet::LineStringImpl< ConstLineStringT >

Implementation template class that is common to all non-const types.

Definition at line 364 of file primitives/LineString.h.

Member Typedef Documentation

◆ Base

template<typename ConstLineStringT >
using lanelet::LineStringImpl< ConstLineStringT >::Base = Primitive<ConstLineStringT>
protected

Definition at line 366 of file primitives/LineString.h.

◆ iterator

template<typename ConstLineStringT >
using lanelet::LineStringImpl< ConstLineStringT >::iterator = internal::SelectLsIteratorT<PointType>

Definition at line 371 of file primitives/LineString.h.

◆ PointType

template<typename ConstLineStringT >
using lanelet::LineStringImpl< ConstLineStringT >::PointType = typename Base::MutablePointType

Definition at line 370 of file primitives/LineString.h.

◆ SegmentType

template<typename ConstLineStringT >
using lanelet::LineStringImpl< ConstLineStringT >::SegmentType = typename Base::SegmentType

Definition at line 375 of file primitives/LineString.h.

Constructor & Destructor Documentation

◆ LineStringImpl() [1/6]

template<typename ConstLineStringT >
lanelet::LineStringImpl< ConstLineStringT >::LineStringImpl ( )
default

◆ LineStringImpl() [2/6]

template<typename ConstLineStringT >
template<typename OtherT >
lanelet::LineStringImpl< ConstLineStringT >::LineStringImpl ( const LineStringImpl< OtherT > &  other)
inlineexplicit

Construct from other (mutable!) LineStrings.

Definition at line 380 of file primitives/LineString.h.

◆ LineStringImpl() [3/6]

template<typename ConstLineStringT >
lanelet::LineStringImpl< ConstLineStringT >::LineStringImpl ( const std::shared_ptr< const LineStringData > &  ,
bool  inverted 
)
explicitdelete

◆ LineStringImpl() [4/6]

template<typename ConstLineStringT >
lanelet::LineStringImpl< ConstLineStringT >::LineStringImpl ( const std::shared_ptr< LineStringData > &  data,
bool  inverted 
)
inlineexplicit

Construct from linestring data.

Definition at line 385 of file primitives/LineString.h.

◆ LineStringImpl() [5/6]

template<typename ConstLineStringT >
lanelet::LineStringImpl< ConstLineStringT >::LineStringImpl ( LineStringImpl< ConstLineStringT > &&  rhs)
protecteddefaultnoexcept

◆ LineStringImpl() [6/6]

template<typename ConstLineStringT >
lanelet::LineStringImpl< ConstLineStringT >::LineStringImpl ( const LineStringImpl< ConstLineStringT > &  rhs)
protecteddefault

◆ ~LineStringImpl()

template<typename ConstLineStringT >
lanelet::LineStringImpl< ConstLineStringT >::~LineStringImpl ( )
protecteddefaultnoexcept

Member Function Documentation

◆ back()

template<typename ConstLineStringT >
PointType& lanelet::LineStringImpl< ConstLineStringT >::back ( )
inline

get a reference to the last element if it exists

Definition at line 490 of file primitives/LineString.h.

◆ begin()

template<typename ConstLineStringT >
iterator lanelet::LineStringImpl< ConstLineStringT >::begin ( )
inline

mutable iterator for the elements of this vector.

Definition at line 481 of file primitives/LineString.h.

◆ clear()

template<typename ConstLineStringT >
void lanelet::LineStringImpl< ConstLineStringT >::clear ( )
inline

Remove all points, making the linestring invalid until new points are inserted.

Definition at line 470 of file primitives/LineString.h.

◆ end()

template<typename ConstLineStringT >
iterator lanelet::LineStringImpl< ConstLineStringT >::end ( )
inline

mutable iterator to the end of the elements of this vector.

Definition at line 484 of file primitives/LineString.h.

◆ erase()

template<typename ConstLineStringT >
iterator lanelet::LineStringImpl< ConstLineStringT >::erase ( iterator  position)
inline

Removes point, returns iterator to the next point.

Definition at line 439 of file primitives/LineString.h.

◆ front()

template<typename ConstLineStringT >
PointType& lanelet::LineStringImpl< ConstLineStringT >::front ( )
inline

get a refernce to the first element (make sure it exists)

Definition at line 487 of file primitives/LineString.h.

◆ insert() [1/2]

template<typename ConstLineStringT >
iterator lanelet::LineStringImpl< ConstLineStringT >::insert ( iterator  position,
const PointType point 
)
inline

Inserts an element at a specific position.

Just as you would expect from an std::vector... If you plan to insert more elements than one, use the ranged version below. That saves you from some unnecessary cache regenerations.

Definition at line 413 of file primitives/LineString.h.

◆ insert() [2/2]

template<typename ConstLineStringT >
template<typename InIter >
iterator lanelet::LineStringImpl< ConstLineStringT >::insert ( iterator  position,
InIter  start,
InIter  end 
)
inline

Inserts an range of elements at a specific position.

Definition at line 421 of file primitives/LineString.h.

◆ operator=() [1/4]

template<typename ConstLineStringT >
LineStringImpl& lanelet::LineStringImpl< ConstLineStringT >::operator= ( const LineStringImpl< ConstLineStringT > &  rhs)
protecteddefault

◆ operator=() [2/4]

template<typename ConstLineStringT >
LineStringImpl& lanelet::LineStringImpl< ConstLineStringT >::operator= ( LineStringImpl< ConstLineStringT > &&  rhs)
protecteddefaultnoexcept

◆ operator=() [3/4]

template<typename ConstLineStringT >
LineStringImpl& lanelet::LineStringImpl< ConstLineStringT >::operator= ( std::vector< Point3d > &&  rhs)
inline

Move assign from a normal vector. Id and attributes stay unchanged.

Definition at line 398 of file primitives/LineString.h.

◆ operator=() [4/4]

template<typename ConstLineStringT >
LineStringImpl& lanelet::LineStringImpl< ConstLineStringT >::operator= ( std::vector< PointType rhs)
inline

Copy assign from a normal vector. The Id of this object is unchanged.

Definition at line 388 of file primitives/LineString.h.

◆ operator[]()

template<typename ConstLineStringT >
PointType& lanelet::LineStringImpl< ConstLineStringT >::operator[] ( size_t  idx)
inline

access element at specific position

Definition at line 493 of file primitives/LineString.h.

◆ points()

template<typename ConstLineStringT >
Points3d& lanelet::LineStringImpl< ConstLineStringT >::points ( )
inlineprotected

Definition at line 515 of file primitives/LineString.h.

◆ pop_back()

template<typename ConstLineStringT >
void lanelet::LineStringImpl< ConstLineStringT >::pop_back ( )
inline

removes element from the end

Definition at line 449 of file primitives/LineString.h.

◆ push_back()

template<typename ConstLineStringT >
void lanelet::LineStringImpl< ConstLineStringT >::push_back ( const PointType point)
inline

inserts a new element at the end

Definition at line 434 of file primitives/LineString.h.

◆ reserve()

template<typename ConstLineStringT >
void lanelet::LineStringImpl< ConstLineStringT >::reserve ( size_t  num)
inline

request a change in capacity

Definition at line 454 of file primitives/LineString.h.

◆ resize()

template<typename ConstLineStringT >
void lanelet::LineStringImpl< ConstLineStringT >::resize ( size_t  num)
inline

Changes the number of points contained either by deleting them or by inserting new (invalId points).

Definition at line 458 of file primitives/LineString.h.

◆ segment()

template<typename ConstLineStringT >
SegmentType lanelet::LineStringImpl< ConstLineStringT >::segment ( size_t  idx)
inlinenoexcept

returns the n-th segment. If n equals size() -1, the segment from back() to front() is returned.

Definition at line 502 of file primitives/LineString.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