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

DataType Latitude. More...

#include <ad/map/point/Latitude.hpp>

Public Member Functions

 Latitude ()
 default constructor More...
 
_AD_MAP_POINT_LATITUDE_EXPLICIT_CONVERSION_ Latitude (double const iLatitude)
 standard constructor More...
 
 Latitude (const Latitude &other)=default
 standard copy constructor
 
 Latitude (Latitude &&other)=default
 standard move constructor
 
Latitudeoperator= (const Latitude &other)=default
 standard assignment operator More...
 
Latitudeoperator= (Latitude &&other)=default
 standard move operator More...
 
bool operator== (const Latitude &other) const
 standard comparison operator More...
 
bool operator!= (const Latitude &other) const
 standard comparison operator More...
 
bool operator> (const Latitude &other) const
 standard comparison operator More...
 
bool operator< (const Latitude &other) const
 standard comparison operator More...
 
bool operator>= (const Latitude &other) const
 standard comparison operator More...
 
bool operator<= (const Latitude &other) const
 standard comparison operator More...
 
Latitude operator+ (const Latitude &other) const
 standard arithmetic operator More...
 
Latitudeoperator+= (const Latitude &other)
 standard arithmetic operator More...
 
Latitude operator- (const Latitude &other) const
 standard arithmetic operator More...
 
Latitude operator-= (const Latitude &other)
 standard arithmetic operator More...
 
Latitude operator* (const double &scalar) const
 standard arithmetic operator More...
 
Latitude operator/ (const double &scalar) const
 standard arithmetic operator More...
 
double operator/ (const Latitude &other) const
 standard arithmetic operator More...
 
Latitude operator- () const
 standard arithmetic operator More...
 
_AD_MAP_POINT_LATITUDE_EXPLICIT_CONVERSION_ operator double () const
 conversion to base type: double More...
 
bool isValid () const
 
void ensureValid () const
 ensure that the Latitude is valid More...
 
void ensureValidNonZero () const
 ensure that the Latitude is valid and non zero More...
 

Static Public Member Functions

static Latitude getMin ()
 get minimum valid Latitude (i.e. cMinValue)
 
static Latitude getMax ()
 get maximum valid Latitude (i.e. cMaxValue)
 
static Latitude getPrecision ()
 get assumed accuracy of Latitude (i.e. cPrecisionValue)
 

Static Public Attributes

static const double cMinValue
 constant defining the minimum valid Latitude value (used in isValid())
 
static const double cMaxValue
 constant defining the maximum valid Latitude value (used in isValid())
 
static const double cPrecisionValue
 constant defining the assumed Latitude value accuracy (used in comparison operator==(), operator!=())
 

Detailed Description

DataType Latitude.

WGS-84 Latitude The unit is: Degree

Constructor & Destructor Documentation

◆ Latitude() [1/2]

ad::map::point::Latitude::Latitude ( )
inline

default constructor

The default value of Latitude is: std::numeric_limits<double>::quiet_NaN()

◆ Latitude() [2/2]

_AD_MAP_POINT_LATITUDE_EXPLICIT_CONVERSION_ ad::map::point::Latitude::Latitude ( double const  iLatitude)
inline

standard constructor

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

Member Function Documentation

◆ ensureValid()

void ad::map::point::Latitude::ensureValid ( ) const
inline

ensure that the Latitude is valid

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

◆ ensureValidNonZero()

void ad::map::point::Latitude::ensureValidNonZero ( ) const
inline

ensure that the Latitude is valid and non zero

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

◆ isValid()

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

An Latitude value is defined to be valid if:

◆ operator double()

_AD_MAP_POINT_LATITUDE_EXPLICIT_CONVERSION_ ad::map::point::Latitude::operator double ( ) const
inline

conversion to base type: double

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

◆ operator!=()

bool ad::map::point::Latitude::operator!= ( const Latitude other) const
inline

standard comparison operator

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

◆ operator*()

Latitude ad::map::point::Latitude::operator* ( const double &  scalar) const
inline

standard arithmetic operator

Parameters
[in]scalarScalar double value
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if value or the result of the operation is not valid

◆ operator+()

Latitude ad::map::point::Latitude::operator+ ( const Latitude other) const
inline

standard arithmetic operator

Parameters
[in]otherOther Latitude
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+=()

Latitude& ad::map::point::Latitude::operator+= ( const Latitude other)
inline

standard arithmetic operator

Parameters
[in]otherOther Latitude
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-() [1/2]

Latitude ad::map::point::Latitude::operator- ( ) const
inline

standard arithmetic operator

Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if this or the result of the operation is not valid

◆ operator-() [2/2]

Latitude ad::map::point::Latitude::operator- ( const Latitude other) const
inline

standard arithmetic operator

Parameters
[in]otherOther Latitude
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-=()

Latitude ad::map::point::Latitude::operator-= ( const Latitude other)
inline

standard arithmetic operator

Parameters
[in]otherOther Latitude
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/() [1/2]

Latitude ad::map::point::Latitude::operator/ ( const double &  scalar) const
inline

standard arithmetic operator

Parameters
[in]scalarScalar double value
Returns
Result of arithmetic operation.
Note
throws a std::out_of_range exception if this or the result of the operation is not valid or other is zero

◆ operator/() [2/2]

double ad::map::point::Latitude::operator/ ( const Latitude other) const
inline

standard arithmetic operator

Parameters
[in]otherOther Latitude
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 or other is zero
since Latitude is a type with physical unit, the division results in the dimensionless type.

◆ operator<()

bool ad::map::point::Latitude::operator< ( const Latitude other) const
inline

standard comparison operator

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

◆ operator<=()

bool ad::map::point::Latitude::operator<= ( const Latitude other) const
inline

standard comparison operator

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

◆ operator=() [1/2]

Latitude& ad::map::point::Latitude::operator= ( const Latitude other)
default

standard assignment operator

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

◆ operator=() [2/2]

Latitude& ad::map::point::Latitude::operator= ( Latitude &&  other)
default

standard move operator

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

◆ operator==()

bool ad::map::point::Latitude::operator== ( const Latitude other) const
inline

standard comparison operator

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

◆ operator>()

bool ad::map::point::Latitude::operator> ( const Latitude other) const
inline

standard comparison operator

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

◆ operator>=()

bool ad::map::point::Latitude::operator>= ( const Latitude other) const
inline

standard comparison operator

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

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