CARLA
Classes | Public Types | Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
carla::road::RoadElementSet< T > Class Template Reference

A set of elements ordered by its position on the road. More...

#include <RoadElementSet.h>

+ Inheritance diagram for carla::road::RoadElementSet< T >:
+ Collaboration diagram for carla::road::RoadElementSet< T >:

Classes

struct  LessComp
 

Public Types

using key_type = double
 
using mapped_type = T
 

Public Member Functions

auto begin () const
 
bool empty () const
 
auto end () const
 
const std::vector< mapped_type > & GetAll () const
 Return all values from the set. More...
 
auto GetReverseSubset (const key_type k) const
 Return a reversed list of elements that have key value GetDistance() <= s. More...
 
auto GetReverseSubsetInRange (const key_type min_k, const key_type max_k) const
 
auto GetSubsetInRange (const key_type min_k, const key_type max_k) const
 Return a list of elements that have a key value in the range [min_k, max_k]. More...
 
 RoadElementSet ()=default
 
template<typename InputTypeT >
 RoadElementSet (std::vector< InputTypeT > &&range)
 Explicit move constructor. More...
 
size_t size () const
 

Static Private Member Functions

static key_type GetDistance (const key_type key)
 
template<typename ValueT >
static key_type GetDistance (const ValueT &value)
 
template<typename ValueT >
static key_type GetDistance (const ValueT *value)
 
template<typename ValueT >
static key_type GetDistance (const std::unique_ptr< ValueT > &value)
 

Private Attributes

std::vector< mapped_type_vec
 

Additional Inherited Members

- Private Member Functions inherited from carla::MovableNonCopyable
 MovableNonCopyable ()=default
 
 MovableNonCopyable (const MovableNonCopyable &)=delete
 
 MovableNonCopyable (MovableNonCopyable &&)=default
 
MovableNonCopyableoperator= (const MovableNonCopyable &)=delete
 
MovableNonCopyableoperator= (MovableNonCopyable &&)=default
 

Detailed Description

template<typename T>
class carla::road::RoadElementSet< T >

A set of elements ordered by its position on the road.

Definition at line 23 of file RoadElementSet.h.

Member Typedef Documentation

◆ key_type

template<typename T>
using carla::road::RoadElementSet< T >::key_type = double

Definition at line 28 of file RoadElementSet.h.

◆ mapped_type

template<typename T>
using carla::road::RoadElementSet< T >::mapped_type = T

Definition at line 26 of file RoadElementSet.h.

Constructor & Destructor Documentation

◆ RoadElementSet() [1/2]

template<typename T>
carla::road::RoadElementSet< T >::RoadElementSet ( )
default

◆ RoadElementSet() [2/2]

template<typename T>
template<typename InputTypeT >
carla::road::RoadElementSet< T >::RoadElementSet ( std::vector< InputTypeT > &&  range)
inline

Explicit move constructor.

Definition at line 34 of file RoadElementSet.h.

Member Function Documentation

◆ begin()

template<typename T>
auto carla::road::RoadElementSet< T >::begin ( ) const
inline

Definition at line 77 of file RoadElementSet.h.

◆ empty()

template<typename T>
bool carla::road::RoadElementSet< T >::empty ( ) const
inline

Definition at line 69 of file RoadElementSet.h.

◆ end()

template<typename T>
auto carla::road::RoadElementSet< T >::end ( ) const
inline

Definition at line 81 of file RoadElementSet.h.

◆ GetAll()

template<typename T>
const std::vector<mapped_type>& carla::road::RoadElementSet< T >::GetAll ( ) const
inline

Return all values from the set.

Definition at line 44 of file RoadElementSet.h.

◆ GetDistance() [1/4]

template<typename T>
static key_type carla::road::RoadElementSet< T >::GetDistance ( const key_type  key)
inlinestaticprivate

Definition at line 87 of file RoadElementSet.h.

Referenced by carla::road::RoadElementSet< T >::LessComp::operator()().

+ Here is the caller graph for this function:

◆ GetDistance() [2/4]

template<typename T>
template<typename ValueT >
static key_type carla::road::RoadElementSet< T >::GetDistance ( const ValueT &  value)
inlinestaticprivate

Definition at line 92 of file RoadElementSet.h.

◆ GetDistance() [3/4]

template<typename T>
template<typename ValueT >
static key_type carla::road::RoadElementSet< T >::GetDistance ( const ValueT *  value)
inlinestaticprivate

Definition at line 97 of file RoadElementSet.h.

◆ GetDistance() [4/4]

template<typename T>
template<typename ValueT >
static key_type carla::road::RoadElementSet< T >::GetDistance ( const std::unique_ptr< ValueT > &  value)
inlinestaticprivate

Definition at line 102 of file RoadElementSet.h.

◆ GetReverseSubset()

template<typename T>
auto carla::road::RoadElementSet< T >::GetReverseSubset ( const key_type  k) const
inline

Return a reversed list of elements that have key value GetDistance() <= s.

Definition at line 50 of file RoadElementSet.h.

◆ GetReverseSubsetInRange()

template<typename T>
auto carla::road::RoadElementSet< T >::GetReverseSubsetInRange ( const key_type  min_k,
const key_type  max_k 
) const
inline

Definition at line 63 of file RoadElementSet.h.

◆ GetSubsetInRange()

template<typename T>
auto carla::road::RoadElementSet< T >::GetSubsetInRange ( const key_type  min_k,
const key_type  max_k 
) const
inline

Return a list of elements that have a key value in the range [min_k, max_k].

Definition at line 57 of file RoadElementSet.h.

◆ size()

template<typename T>
size_t carla::road::RoadElementSet< T >::size ( ) const
inline

Definition at line 73 of file RoadElementSet.h.

Member Data Documentation

◆ _vec

template<typename T>
std::vector<mapped_type> carla::road::RoadElementSet< T >::_vec
private

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