Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
lanelet::ConstLineStringImpl< PointT > Class Template Reference

Implementation template class that is common to all LineStrings. More...

#include <LineString.h>

Inheritance diagram for lanelet::ConstLineStringImpl< PointT >:
Inheritance graph
[legend]

Classes

class  CompoundLineString
 

Public Types

using BasicIterator = internal::TransformIterator< const_iterator, const BasicPointType >
 
using BasicLineString = internal::SelectBasicLineStringT< BasicPointType >
 
using BasicPointType = traits::BasicPointT< PointT >
 
using Category = traits::LineStringTag
 
using const_iterator = internal::SelectLsIteratorT< const ConstPointType >
 
using ConstPointType = traits::ConstPointT< PointT >
 
using ConstSegmentType = traits::ConstPrimitiveType< SegmentType >
 
using difference_type = typename iterator::difference_type
 
using iterator = const_iterator
 
using MutablePointType = traits::MutablePointT< PointT >
 linestring will return this point type More...
 
using PointType = ConstPointType
 
using SegmentType = Segment< PointT >
 
using size_type = size_t
 
using value_type = ConstPointType
 
- Public Types inherited from lanelet::ConstPrimitive< LineStringData >
using DataType = LineStringData
 

Public Member Functions

const ConstPointTypeback () const noexcept
 returns the last point (if it exist) More...
 
BasicIterator basicBegin () const noexcept
 returns a normal iterator to the internal point type at begin More...
 
BasicIterator basicEnd () const noexcept
 returns a normal iterator for the internal point type at end More...
 
BasicLineString basicLineString () const noexcept
 Create a basic linestring (ie a vector of Eigen Points) More...
 
const_iterator begin () const noexcept
 Returns an iterator to the start of the points. More...
 
template<typename OtherT >
 ConstLineStringImpl (const ConstLineStringImpl< OtherT > &other)
 construct from other ConstLineStrings More...
 
 ConstLineStringImpl (const std::shared_ptr< const LineStringData > &data, bool inverted=false)
 Constructs a linestring from the data object of another linestring. More...
 
 ConstLineStringImpl (Id id=InvalId, Points3d points=Points3d(), const AttributeMap &attributes=AttributeMap())
 Constructs a LineString or similar from an Id and a list of points. More...
 
bool empty () const noexcept
 return if there are any points in this object More...
 
const_iterator end () const noexcept
 Returns an iterator to end of the points. More...
 
const ConstPointTypefront () const noexcept
 returns the first point (if it exist) More...
 
bool inverted () const noexcept
 Returns whether this is an inverted linestring. More...
 
size_t numSegments () const noexcept
 Returns the number of (geometrically valid) segments. More...
 
const ConstPointTypeoperator[] (size_t idx) const noexcept
 returns the point at this position More...
 
ConstSegmentType segment (size_t idx) const noexcept
 returns the n-th segment. If n equals size() -1, the segment from back() to front() is returned. More...
 
size_t size () const noexcept
 Return the number of points in this linestring. More...
 
- Public Member Functions inherited from lanelet::ConstPrimitive< LineStringData >
const Attributeattribute (AttributeName name) const
 retrieve an attribute (enum version) More...
 
const Attributeattribute (const std::string &name) const
 retrieve an attribute More...
 
attributeOr (AttributeName name, T defaultVal) const
 retrieve an attribute (enum version) More...
 
attributeOr (const std::string &name, T defaultVal) const noexcept
 retrieve an attribute (string version) More...
 
const AttributeMapattributes () const
 get the attributes of this primitive More...
 
const std::shared_ptr< const LineStringData > & constData () const
 get the internal data of this primitive More...
 
 ConstPrimitive (const std::shared_ptr< const LineStringData > &data)
 Construct from a pointer to the data. More...
 
bool hasAttribute (AttributeName name) const noexcept
 check for an attribute (enum version) More...
 
bool hasAttribute (const std::string &name) const noexcept
 check whether this primitive has a specific attribute More...
 
Id id () const noexcept
 get the unique id of this primitive More...
 
bool operator!= (const ConstPrimitive &rhs) const
 
bool operator== (const ConstPrimitive &rhs) const
 

Static Public Attributes

static constexpr traits::Dimensions Dimension = traits::PointTraits<PointT>::Dimension
 
- Static Public Attributes inherited from lanelet::ConstPrimitive< LineStringData >
static constexpr bool IsConst
 

Protected Member Functions

 ConstLineStringImpl (const ConstLineStringImpl &rhs)=default
 
 ConstLineStringImpl (ConstLineStringImpl &&rhs) noexcept=default
 
ConstLineStringImploperator= (const ConstLineStringImpl &rhs)=default
 
ConstLineStringImploperator= (ConstLineStringImpl &&rhs) noexcept=default
 
 ~ConstLineStringImpl () noexcept=default
 
- Protected Member Functions inherited from lanelet::ConstPrimitive< LineStringData >
 ConstPrimitive (const ConstPrimitive &rhs)=default
 
 ConstPrimitive (ConstPrimitive &&rhs) noexcept=default
 
ConstPrimitiveoperator= (const ConstPrimitive &rhs)=default
 
ConstPrimitiveoperator= (ConstPrimitive &&rhs) noexcept=default
 
 ~ConstPrimitive () noexcept=default
 

Private Attributes

bool inverted_ {false}
 

Detailed Description

template<typename PointT>
class lanelet::ConstLineStringImpl< PointT >

Implementation template class that is common to all LineStrings.

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

Member Typedef Documentation

◆ BasicIterator

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

◆ BasicLineString

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

◆ BasicPointType

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::BasicPointType = traits::BasicPointT<PointT>

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

◆ Category

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::Category = traits::LineStringTag

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

◆ const_iterator

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::const_iterator = internal::SelectLsIteratorT<const ConstPointType>

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

◆ ConstPointType

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::ConstPointType = traits::ConstPointT<PointT>

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

◆ ConstSegmentType

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

◆ difference_type

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::difference_type = typename iterator::difference_type

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

◆ iterator

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::iterator = const_iterator

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

◆ MutablePointType

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::MutablePointType = traits::MutablePointT<PointT>

linestring will return this point type

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

◆ PointType

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::PointType = ConstPointType

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

◆ SegmentType

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::SegmentType = Segment<PointT>

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

◆ size_type

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::size_type = size_t

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

◆ value_type

template<typename PointT >
using lanelet::ConstLineStringImpl< PointT >::value_type = ConstPointType

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

Constructor & Destructor Documentation

◆ ConstLineStringImpl() [1/5]

template<typename PointT >
lanelet::ConstLineStringImpl< PointT >::ConstLineStringImpl ( Id  id = InvalId,
Points3d  points = Points3d(),
const AttributeMap attributes = AttributeMap() 
)
inlineexplicit

Constructs a LineString or similar from an Id and a list of points.

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

◆ ConstLineStringImpl() [2/5]

template<typename PointT >
lanelet::ConstLineStringImpl< PointT >::ConstLineStringImpl ( const std::shared_ptr< const LineStringData > &  data,
bool  inverted = false 
)
inlineexplicit

Constructs a linestring from the data object of another linestring.

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

◆ ConstLineStringImpl() [3/5]

template<typename PointT >
template<typename OtherT >
lanelet::ConstLineStringImpl< PointT >::ConstLineStringImpl ( const ConstLineStringImpl< OtherT > &  other)
inlineexplicit

construct from other ConstLineStrings

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

◆ ConstLineStringImpl() [4/5]

template<typename PointT >
lanelet::ConstLineStringImpl< PointT >::ConstLineStringImpl ( ConstLineStringImpl< PointT > &&  rhs)
protecteddefaultnoexcept

◆ ConstLineStringImpl() [5/5]

template<typename PointT >
lanelet::ConstLineStringImpl< PointT >::ConstLineStringImpl ( const ConstLineStringImpl< PointT > &  rhs)
protecteddefault

◆ ~ConstLineStringImpl()

template<typename PointT >
lanelet::ConstLineStringImpl< PointT >::~ConstLineStringImpl ( )
protecteddefaultnoexcept

Member Function Documentation

◆ back()

template<typename PointT >
const ConstPointType& lanelet::ConstLineStringImpl< PointT >::back ( ) const
inlinenoexcept

returns the last point (if it exist)

See also
front, operator[]

The internal point type is a different one, but because all points inherit from the internal point type, no slicing is possible.

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

◆ basicBegin()

template<typename PointT >
BasicIterator lanelet::ConstLineStringImpl< PointT >::basicBegin ( ) const
inlinenoexcept

returns a normal iterator to the internal point type at begin

See also
basicEnd, begin

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

◆ basicEnd()

template<typename PointT >
BasicIterator lanelet::ConstLineStringImpl< PointT >::basicEnd ( ) const
inlinenoexcept

returns a normal iterator for the internal point type at end

See also
basicBegin, end

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

◆ basicLineString()

template<typename PointT >
BasicLineString lanelet::ConstLineStringImpl< PointT >::basicLineString ( ) const
inlinenoexcept

Create a basic linestring (ie a vector of Eigen Points)

A basic linestring is a simple vector with eigen points. You can do what you want with these points, because changes to them will not affect lanelet objects.

BasicLineString is registered with boost::geometry, therefore you can use it for geometry calculations.

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

◆ begin()

template<typename PointT >
const_iterator lanelet::ConstLineStringImpl< PointT >::begin ( ) const
inlinenoexcept

Returns an iterator to the start of the points.

See also
end, basicBegin Dereferencing the iterator will convert the point from the internal Point3d to PointType

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

◆ empty()

template<typename PointT >
bool lanelet::ConstLineStringImpl< PointT >::empty ( ) const
inlinenoexcept

return if there are any points in this object

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

◆ end()

template<typename PointT >
const_iterator lanelet::ConstLineStringImpl< PointT >::end ( ) const
inlinenoexcept

Returns an iterator to end of the points.

See also
begin, basicEnd Dereferencing the iterator will convert the point from the internal Point3d to PointType

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

◆ front()

template<typename PointT >
const ConstPointType& lanelet::ConstLineStringImpl< PointT >::front ( ) const
inlinenoexcept

returns the first point (if it exist)

See also
back, at The internal point type is a different one, but because all points inherit from the internal point type, no slicing is possible.

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

◆ inverted()

template<typename PointT >
bool lanelet::ConstLineStringImpl< PointT >::inverted ( ) const
inlinenoexcept

Returns whether this is an inverted linestring.

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

◆ numSegments()

template<typename PointT >
size_t lanelet::ConstLineStringImpl< PointT >::numSegments ( ) const
inlinenoexcept

Returns the number of (geometrically valid) segments.

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

◆ operator=() [1/2]

template<typename PointT >
ConstLineStringImpl& lanelet::ConstLineStringImpl< PointT >::operator= ( const ConstLineStringImpl< PointT > &  rhs)
protecteddefault

◆ operator=() [2/2]

template<typename PointT >
ConstLineStringImpl& lanelet::ConstLineStringImpl< PointT >::operator= ( ConstLineStringImpl< PointT > &&  rhs)
protecteddefaultnoexcept

◆ operator[]()

template<typename PointT >
const ConstPointType& lanelet::ConstLineStringImpl< PointT >::operator[] ( size_t  idx) const
inlinenoexcept

returns the point at this position

See also
front, operator[]

The internal point type is a different one, but because all points inherit from the internal point type, no slicing is possible.

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

◆ segment()

template<typename PointT >
ConstSegmentType lanelet::ConstLineStringImpl< PointT >::segment ( size_t  idx) const
inlinenoexcept

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

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

◆ size()

template<typename PointT >
size_t lanelet::ConstLineStringImpl< PointT >::size ( ) const
inlinenoexcept

Return the number of points in this linestring.

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

Member Data Documentation

◆ Dimension

template<typename PointT >
constexpr traits::Dimensions lanelet::ConstLineStringImpl< PointT >::Dimension = traits::PointTraits<PointT>::Dimension
staticconstexpr

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

◆ inverted_

template<typename PointT >
bool lanelet::ConstLineStringImpl< PointT >::inverted_ {false}
private

Definition at line 359 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