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

DataType Altitude. More...

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

Public Member Functions

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

Static Public Member Functions

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

Static Public Attributes

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

Detailed Description

DataType Altitude.

WGS-84 Altitude Depth of the Mariana Trench [m] 10994 Height of the Mount Everest [m] 8848 The unit is: Meter

Constructor & Destructor Documentation

◆ Altitude() [1/2]

ad::map::point::Altitude::Altitude ( )
inline

default constructor

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

◆ Altitude() [2/2]

_AD_MAP_POINT_ALTITUDE_EXPLICIT_CONVERSION_ ad::map::point::Altitude::Altitude ( double const  iAltitude)
inline

standard constructor

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

Member Function Documentation

◆ ensureValid()

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

ensure that the Altitude is valid

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

◆ ensureValidNonZero()

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

ensure that the Altitude is valid and non zero

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

◆ isValid()

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

An Altitude value is defined to be valid if:

◆ operator double()

_AD_MAP_POINT_ALTITUDE_EXPLICIT_CONVERSION_ ad::map::point::Altitude::operator double ( ) const
inline

conversion to base type: double

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

◆ operator!=()

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

standard comparison operator

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

◆ operator*()

Altitude ad::map::point::Altitude::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+()

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

standard arithmetic operator

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

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

standard arithmetic operator

Parameters
[in]otherOther Altitude
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]

Altitude ad::map::point::Altitude::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]

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

standard arithmetic operator

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

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

standard arithmetic operator

Parameters
[in]otherOther Altitude
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]

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

standard arithmetic operator

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

◆ operator/() [2/2]

Altitude ad::map::point::Altitude::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<()

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

standard comparison operator

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

◆ operator<=()

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

standard comparison operator

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

◆ operator=() [1/2]

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

standard move operator

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

◆ operator=() [2/2]

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

standard assignment operator

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

◆ operator==()

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

standard comparison operator

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

◆ operator>()

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

standard comparison operator

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

◆ operator>=()

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

standard comparison operator

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

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