ad_map_access
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ad::map::lane::LaneId Class Reference

DataType LaneId. More...

#include <ad/map/lane/LaneId.hpp>

Public Member Functions

 LaneId ()
 default constructor More...
 
_AD_MAP_LANE_LANEID_EXPLICIT_CONVERSION_ LaneId (uint64_t const iLaneId)
 standard constructor More...
 
 LaneId (const LaneId &other)=default
 standard copy constructor
 
 LaneId (LaneId &&other)=default
 standard move constructor
 
LaneIdoperator= (const LaneId &other)=default
 standard assignment operator More...
 
LaneIdoperator= (LaneId &&other)=default
 standard move operator More...
 
bool operator== (const LaneId &other) const
 standard comparison operator More...
 
bool operator!= (const LaneId &other) const
 standard comparison operator More...
 
bool operator> (const LaneId &other) const
 standard comparison operator More...
 
bool operator< (const LaneId &other) const
 standard comparison operator More...
 
bool operator>= (const LaneId &other) const
 standard comparison operator More...
 
bool operator<= (const LaneId &other) const
 standard comparison operator More...
 
LaneId operator+ (const LaneId &other) const
 standard arithmetic operator More...
 
LaneIdoperator+= (const LaneId &other)
 standard arithmetic operator More...
 
LaneId operator- (const LaneId &other) const
 standard arithmetic operator More...
 
LaneId operator-= (const LaneId &other)
 standard arithmetic operator More...
 
_AD_MAP_LANE_LANEID_EXPLICIT_CONVERSION_ operator uint64_t () const
 conversion to base type: uint64_t More...
 
bool isValid () const
 
void ensureValid () const
 ensure that the LaneId is valid More...
 
void ensureValidNonZero () const
 ensure that the LaneId is valid and non zero More...
 

Static Public Member Functions

static LaneId getMin ()
 get minimum valid LaneId (i.e. cMinValue)
 
static LaneId getMax ()
 get maximum valid LaneId (i.e. cMaxValue)
 

Static Public Attributes

static const uint64_t cMinValue
 constant defining the minimum valid LaneId value (used in isValid())
 
static const uint64_t cMaxValue
 constant defining the maximum valid LaneId value (used in isValid())
 

Detailed Description

DataType LaneId.

Defines the identifier of a lane of the map. The unit is: Identifier

Constructor & Destructor Documentation

◆ LaneId() [1/2]

ad::map::lane::LaneId::LaneId ( )
inline

default constructor

The default value of LaneId is: std::numeric_limits<uint64_t>::quiet_NaN()

◆ LaneId() [2/2]

_AD_MAP_LANE_LANEID_EXPLICIT_CONVERSION_ ad::map::lane::LaneId::LaneId ( uint64_t const  iLaneId)
inline

standard constructor

Note
_AD_MAP_LANE_LANEID_EXPLICIT_CONVERSION_ defines, if only an explicit conversion is allowed.

Member Function Documentation

◆ ensureValid()

void ad::map::lane::LaneId::ensureValid ( ) const
inline

ensure that the LaneId is valid

Throws an std::out_of_range() exception if the LaneId in not valid (i.e. isValid() returns false)

◆ ensureValidNonZero()

void ad::map::lane::LaneId::ensureValidNonZero ( ) const
inline

ensure that the LaneId is valid and non zero

Throws an std::out_of_range() exception if the LaneId in not valid or zero (i.e. isValid() returns false)

◆ isValid()

bool ad::map::lane::LaneId::isValid ( ) const
inline
Returns
true if the LaneId in a valid range

An LaneId value is defined to be valid if:

◆ operator uint64_t()

_AD_MAP_LANE_LANEID_EXPLICIT_CONVERSION_ ad::map::lane::LaneId::operator uint64_t ( ) const
inline

conversion to base type: uint64_t

Note
the conversion to the base type removes the physical unit. _AD_MAP_LANE_LANEID_EXPLICIT_CONVERSION_ defines, if only explicit calls are allowed.

◆ operator!=()

bool ad::map::lane::LaneId::operator!= ( const LaneId other) const
inline

standard comparison operator

Parameters
[in]otherOther LaneId.
Returns
true if one of the LaneId is not valid or they can be taken as numerically different

◆ operator+()

LaneId ad::map::lane::LaneId::operator+ ( const LaneId other) const
inline

standard arithmetic operator

Parameters
[in]otherOther LaneId
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid

◆ operator+=()

LaneId& ad::map::lane::LaneId::operator+= ( const LaneId other)
inline

standard arithmetic operator

Parameters
[in]otherOther LaneId
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid

◆ operator-()

LaneId ad::map::lane::LaneId::operator- ( const LaneId other) const
inline

standard arithmetic operator

Parameters
[in]otherOther LaneId
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid

◆ operator-=()

LaneId ad::map::lane::LaneId::operator-= ( const LaneId other)
inline

standard arithmetic operator

Parameters
[in]otherOther LaneId
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if one of the two operands or the result of the operation is not valid

◆ operator<()

bool ad::map::lane::LaneId::operator< ( const LaneId other) const
inline

standard comparison operator

Parameters
[in]otherOther LaneId.
Returns
true if both LaneId are valid and this LaneId is strictly numerically smaller than other.
Note
the precision of LaneId is considered

◆ operator<=()

bool ad::map::lane::LaneId::operator<= ( const LaneId other) const
inline

standard comparison operator

Parameters
[in]otherOther LaneId
Returns
true if both LaneId are valid and this LaneId is numerically smaller than other.
Note
the precision of LaneId is considered

◆ operator=() [1/2]

LaneId& ad::map::lane::LaneId::operator= ( const LaneId other)
default

standard assignment operator

Parameters
[in]otherOther LaneId
Returns
Reference to this LaneId.

◆ operator=() [2/2]

LaneId& ad::map::lane::LaneId::operator= ( LaneId &&  other)
default

standard move operator

Parameters
[in]otherOther LaneId
Returns
Reference to this LaneId.

◆ operator==()

bool ad::map::lane::LaneId::operator== ( const LaneId other) const
inline

standard comparison operator

Parameters
[in]otherOther LaneId
Returns
true if both LaneId are valid and can be taken as numerically equal

◆ operator>()

bool ad::map::lane::LaneId::operator> ( const LaneId other) const
inline

standard comparison operator

Parameters
[in]otherOther LaneId.
Returns
true if both LaneId are valid and this LaneId is strictly numerically greater than other.
Note
the precision of LaneId is considered

◆ operator>=()

bool ad::map::lane::LaneId::operator>= ( const LaneId other) const
inline

standard comparison operator

Parameters
[in]otherOther LaneId.
Returns
true if both LaneId are valid and this LaneId is numerically greater than other.
Note
the precision of LaneId is considered

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