LCOV - code coverage report
Current view: top level - generated/include/ad/map/point - Longitude.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 108 108 100.0 %
Date: 2022-10-04 09:48:07 Functions: 29 29 100.0 %
Branches: 46 48 95.8 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
       3                 :            :  *
       4                 :            :  * Copyright (C) 2018-2020 Intel Corporation
       5                 :            :  *
       6                 :            :  * SPDX-License-Identifier: MIT
       7                 :            :  *
       8                 :            :  * ----------------- END LICENSE BLOCK -----------------------------------
       9                 :            :  */
      10                 :            : 
      11                 :            : /**
      12                 :            :  * Generated file
      13                 :            :  * @file
      14                 :            :  *
      15                 :            :  * Generator Version : 11.0.0-1997
      16                 :            :  */
      17                 :            : 
      18                 :            : #pragma once
      19                 :            : 
      20                 :            : #include <cmath>
      21                 :            : #include <iostream>
      22                 :            : #include <limits>
      23                 :            : #include <sstream>
      24                 :            : #include <stdexcept>
      25                 :            : #include "spdlog/fmt/ostr.h"
      26                 :            : #include "spdlog/spdlog.h"
      27                 :            : /*!
      28                 :            :  * @brief namespace ad
      29                 :            :  */
      30                 :            : namespace ad {
      31                 :            : /*!
      32                 :            :  * @brief namespace map
      33                 :            :  */
      34                 :            : namespace map {
      35                 :            : /*!
      36                 :            :  * @brief namespace point
      37                 :            :  *
      38                 :            :  * Handling geographic positions in different coordinate systems
      39                 :            :  */
      40                 :            : namespace point {
      41                 :            : 
      42                 :            : /*!
      43                 :            :  * \brief Define to indicate whether throwing exceptions is enabled
      44                 :            :  */
      45                 :            : #define AD_MAP_POINT_LONGITUDE_THROWS_EXCEPTION 1
      46                 :            : 
      47                 :            : #if SAFE_DATATYPES_EXPLICIT_CONVERSION
      48                 :            : /*!
      49                 :            :  * \brief Enable/Disable explicit conversion. Currently set to "only explicit conversion".
      50                 :            :  */
      51                 :            : #define _AD_MAP_POINT_LONGITUDE_EXPLICIT_CONVERSION_ explicit
      52                 :            : #else
      53                 :            : /*!
      54                 :            :  * \brief Enable/Disable explicit conversion. Currently set to "implicit conversion allowed".
      55                 :            :  */
      56                 :            : #define _AD_MAP_POINT_LONGITUDE_EXPLICIT_CONVERSION_
      57                 :            : #endif
      58                 :            : 
      59                 :            : /*!
      60                 :            :  * \brief DataType Longitude
      61                 :            :  *
      62                 :            :  * WGS-84 Longitude
      63                 :            :  * The unit is: Degree
      64                 :            :  */
      65                 :            : class Longitude
      66                 :            : {
      67                 :            : public:
      68                 :            :   /*!
      69                 :            :    * \brief constant defining the minimum valid Longitude value (used in isValid())
      70                 :            :    */
      71                 :            :   static const double cMinValue;
      72                 :            : 
      73                 :            :   /*!
      74                 :            :    * \brief constant defining the maximum valid Longitude value (used in isValid())
      75                 :            :    */
      76                 :            :   static const double cMaxValue;
      77                 :            : 
      78                 :            :   /*!
      79                 :            :    * \brief constant defining the assumed Longitude value accuracy
      80                 :            :    *   (used in comparison operator==(), operator!=())
      81                 :            :    */
      82                 :            :   static const double cPrecisionValue;
      83                 :            : 
      84                 :            :   /*!
      85                 :            :    * \brief default constructor
      86                 :            :    *
      87                 :            :    * The default value of Longitude is:
      88                 :            :    * std::numeric_limits<double>::quiet_NaN()
      89                 :            :    */
      90                 :         15 :   Longitude()
      91                 :         15 :     : mLongitude(std::numeric_limits<double>::quiet_NaN())
      92                 :            :   {
      93                 :         15 :   }
      94                 :            : 
      95                 :            :   /*!
      96                 :            :    * \brief standard constructor
      97                 :            :    *
      98                 :            :    * \note \ref \_AD_MAP_POINT_LONGITUDE_EXPLICIT_CONVERSION\_ defines, if only an explicit conversion is allowed.
      99                 :            :    */
     100                 :    3291664 :   _AD_MAP_POINT_LONGITUDE_EXPLICIT_CONVERSION_ Longitude(double const iLongitude)
     101                 :    3291664 :     : mLongitude(iLongitude)
     102                 :            :   {
     103                 :    3291664 :   }
     104                 :            : 
     105                 :            :   /*!
     106                 :            :    * \brief standard copy constructor
     107                 :            :    */
     108                 :            :   Longitude(const Longitude &other) = default;
     109                 :            : 
     110                 :            :   /*!
     111                 :            :    * \brief standard move constructor
     112                 :            :    */
     113                 :            :   Longitude(Longitude &&other) = default;
     114                 :            : 
     115                 :            :   /**
     116                 :            :    * \brief standard assignment operator
     117                 :            :    *
     118                 :            :    * \param[in] other Other Longitude
     119                 :            :    *
     120                 :            :    * \returns Reference to this Longitude.
     121                 :            :    */
     122                 :            :   Longitude &operator=(const Longitude &other) = default;
     123                 :            : 
     124                 :            :   /**
     125                 :            :    * \brief standard move operator
     126                 :            :    *
     127                 :            :    * \param[in] other Other Longitude
     128                 :            :    *
     129                 :            :    * \returns Reference to this Longitude.
     130                 :            :    */
     131                 :            :   Longitude &operator=(Longitude &&other) = default;
     132                 :            : 
     133                 :            :   /**
     134                 :            :    * \brief standard comparison operator
     135                 :            :    *
     136                 :            :    * \param[in] other Other Longitude
     137                 :            :    *
     138                 :            :    * \returns \c true if both Longitude are valid and can be taken as numerically equal
     139                 :            :    */
     140                 :        170 :   bool operator==(const Longitude &other) const
     141                 :            :   {
     142                 :        170 :     ensureValid();
     143                 :        168 :     other.ensureValid();
     144                 :        166 :     return std::fabs(mLongitude - other.mLongitude) < cPrecisionValue;
     145                 :            :   }
     146                 :            : 
     147                 :            :   /**
     148                 :            :    * \brief standard comparison operator
     149                 :            :    *
     150                 :            :    * \param[in] other Other Longitude.
     151                 :            :    *
     152                 :            :    * \returns \c true if one of the Longitude is not valid or they can be taken as numerically different
     153                 :            :    */
     154                 :         15 :   bool operator!=(const Longitude &other) const
     155                 :            :   {
     156                 :         15 :     return !operator==(other);
     157                 :            :   }
     158                 :            : 
     159                 :            :   /**
     160                 :            :    * \brief standard comparison operator
     161                 :            :    *
     162                 :            :    * \param[in] other Other Longitude.
     163                 :            :    *
     164                 :            :    * \returns \c true if both Longitude are valid and
     165                 :            :    *   this Longitude is strictly numerically greater than other.
     166                 :            :    * \note the precision of Longitude is considered
     167                 :            :    */
     168                 :          8 :   bool operator>(const Longitude &other) const
     169                 :            :   {
     170                 :          8 :     ensureValid();
     171                 :          7 :     other.ensureValid();
     172   [ +  +  +  + ]:          6 :     return (mLongitude > other.mLongitude) && operator!=(other);
     173                 :            :   }
     174                 :            : 
     175                 :            :   /**
     176                 :            :    * \brief standard comparison operator
     177                 :            :    *
     178                 :            :    * \param[in] other Other Longitude.
     179                 :            :    *
     180                 :            :    * \returns \c true if both Longitude are valid and
     181                 :            :    *   this Longitude is strictly numerically smaller than other.
     182                 :            :    * \note the precision of Longitude is considered
     183                 :            :    */
     184                 :          9 :   bool operator<(const Longitude &other) const
     185                 :            :   {
     186                 :          9 :     ensureValid();
     187                 :          8 :     other.ensureValid();
     188   [ +  +  +  + ]:          7 :     return (mLongitude < other.mLongitude) && operator!=(other);
     189                 :            :   }
     190                 :            : 
     191                 :            :   /**
     192                 :            :    * \brief standard comparison operator
     193                 :            :    *
     194                 :            :    * \param[in] other Other Longitude.
     195                 :            :    *
     196                 :            :    * \returns \c true if both Longitude are valid and
     197                 :            :    *   this Longitude is numerically greater than other.
     198                 :            :    * \note the precision of Longitude is considered
     199                 :            :    */
     200                 :          7 :   bool operator>=(const Longitude &other) const
     201                 :            :   {
     202                 :          7 :     ensureValid();
     203                 :          6 :     other.ensureValid();
     204   [ +  +  +  + ]:          5 :     return ((mLongitude > other.mLongitude) || operator==(other));
     205                 :            :   }
     206                 :            : 
     207                 :            :   /**
     208                 :            :    * \brief standard comparison operator
     209                 :            :    *
     210                 :            :    * \param[in] other Other Longitude
     211                 :            :    *
     212                 :            :    * \returns \c true if both Longitude are valid and
     213                 :            :    *   this Longitude is numerically smaller than other.
     214                 :            :    * \note the precision of Longitude is considered
     215                 :            :    */
     216                 :    2306326 :   bool operator<=(const Longitude &other) const
     217                 :            :   {
     218                 :    2306326 :     ensureValid();
     219                 :    2306325 :     other.ensureValid();
     220   [ +  +  +  + ]:    2306324 :     return ((mLongitude < other.mLongitude) || operator==(other));
     221                 :            :   }
     222                 :            : 
     223                 :            :   /**
     224                 :            :    * \brief standard arithmetic operator
     225                 :            :    *
     226                 :            :    * \param[in] other Other Longitude
     227                 :            :    *
     228                 :            :    * \returns Result of arithmetic operation.
     229                 :            :    *
     230                 :            :    * \note throws a std::out_of_range exception if one of the two operands or the result of
     231                 :            :    *   the operation is not valid
     232                 :            :    */
     233                 :          6 :   Longitude operator+(const Longitude &other) const
     234                 :            :   {
     235         [ +  + ]:          6 :     ensureValid();
     236         [ +  + ]:          5 :     other.ensureValid();
     237                 :          4 :     Longitude const result(mLongitude + other.mLongitude);
     238         [ +  + ]:          4 :     result.ensureValid();
     239                 :          3 :     return result;
     240                 :            :   }
     241                 :            : 
     242                 :            :   /**
     243                 :            :    * \brief standard arithmetic operator
     244                 :            :    *
     245                 :            :    * \param[in] other Other Longitude
     246                 :            :    *
     247                 :            :    * \returns Result of arithmetic operation.
     248                 :            :    *
     249                 :            :    * \note throws a std::out_of_range exception if one of the two operands or the result of
     250                 :            :    *   the operation is not valid
     251                 :            :    */
     252                 :          4 :   Longitude &operator+=(const Longitude &other)
     253                 :            :   {
     254                 :          4 :     ensureValid();
     255                 :          3 :     other.ensureValid();
     256                 :          2 :     mLongitude += other.mLongitude;
     257                 :          2 :     ensureValid();
     258                 :          1 :     return *this;
     259                 :            :   }
     260                 :            : 
     261                 :            :   /**
     262                 :            :    * \brief standard arithmetic operator
     263                 :            :    *
     264                 :            :    * \param[in] other Other Longitude
     265                 :            :    *
     266                 :            :    * \returns Result of arithmetic operation.
     267                 :            :    *
     268                 :            :    * \note throws a std::out_of_range exception if one of the two operands or the result of
     269                 :            :    *   the operation is not valid
     270                 :            :    */
     271                 :         12 :   Longitude operator-(const Longitude &other) const
     272                 :            :   {
     273         [ +  + ]:         12 :     ensureValid();
     274         [ +  + ]:         11 :     other.ensureValid();
     275                 :         10 :     Longitude const result(mLongitude - other.mLongitude);
     276         [ +  + ]:         10 :     result.ensureValid();
     277                 :          9 :     return result;
     278                 :            :   }
     279                 :            : 
     280                 :            :   /**
     281                 :            :    * \brief standard arithmetic operator
     282                 :            :    *
     283                 :            :    * \param[in] other Other Longitude
     284                 :            :    *
     285                 :            :    * \returns Result of arithmetic operation.
     286                 :            :    *
     287                 :            :    * \note throws a std::out_of_range exception if one of the two operands or the result of
     288                 :            :    *   the operation is not valid
     289                 :            :    */
     290                 :          4 :   Longitude operator-=(const Longitude &other)
     291                 :            :   {
     292                 :          4 :     ensureValid();
     293                 :          3 :     other.ensureValid();
     294                 :          2 :     mLongitude -= other.mLongitude;
     295                 :          2 :     ensureValid();
     296                 :          1 :     return *this;
     297                 :            :   }
     298                 :            : 
     299                 :            :   /**
     300                 :            :    * \brief standard arithmetic operator
     301                 :            :    *
     302                 :            :    * \param[in] scalar Scalar double value
     303                 :            :    *
     304                 :            :    * \returns Result of arithmetic operation.
     305                 :            :    *
     306                 :            :    * \note throws a std::out_of_range exception if \c value or the result of
     307                 :            :    *   the operation is not valid
     308                 :            :    */
     309                 :          8 :   Longitude operator*(const double &scalar) const
     310                 :            :   {
     311         [ +  + ]:          8 :     ensureValid();
     312                 :          7 :     Longitude const result(mLongitude * scalar);
     313         [ +  + ]:          7 :     result.ensureValid();
     314                 :          6 :     return result;
     315                 :            :   }
     316                 :            : 
     317                 :            :   /**
     318                 :            :    * \brief standard arithmetic operator
     319                 :            :    *
     320                 :            :    * \param[in] scalar Scalar double value
     321                 :            :    *
     322                 :            :    * \returns Result of arithmetic operation.
     323                 :            :    *
     324                 :            :    * \note throws a std::out_of_range exception if this or the result of
     325                 :            :    *   the operation is not valid or other is zero
     326                 :            :    */
     327                 :          5 :   Longitude operator/(const double &scalar) const
     328                 :            :   {
     329                 :          5 :     Longitude const scalarLongitude(scalar);
     330         [ +  + ]:          5 :     Longitude const result(operator/(scalarLongitude));
     331         [ +  + ]:          2 :     result.ensureValid();
     332                 :          1 :     return result;
     333                 :            :   }
     334                 :            : 
     335                 :            :   /**
     336                 :            :    * \brief standard arithmetic operator
     337                 :            :    *
     338                 :            :    * \param[in] other Other Longitude
     339                 :            :    *
     340                 :            :    * \returns Result of arithmetic operation.
     341                 :            :    *
     342                 :            :    * \note throws a std::out_of_range exception if one of the two operands or the result of
     343                 :            :    *   the operation is not valid or other is zero
     344                 :            :    * \note since Longitude is a type with physical unit, the division results in the dimensionless type.
     345                 :            :    */
     346                 :          9 :   double operator/(const Longitude &other) const
     347                 :            :   {
     348                 :          9 :     ensureValid();
     349                 :          7 :     other.ensureValidNonZero();
     350                 :          3 :     double const result = mLongitude / other.mLongitude;
     351                 :          3 :     return result;
     352                 :            :   }
     353                 :            : 
     354                 :            :   /**
     355                 :            :    * \brief standard arithmetic operator
     356                 :            :    *
     357                 :            :    * \returns Result of arithmetic operation.
     358                 :            :    *
     359                 :            :    * \note throws a std::out_of_range exception if this or the result of
     360                 :            :    *   the operation is not valid
     361                 :            :    */
     362                 :          2 :   Longitude operator-() const
     363                 :            :   {
     364         [ +  + ]:          2 :     ensureValid();
     365                 :          1 :     Longitude const result(-mLongitude);
     366                 :          1 :     result.ensureValid(); // LCOV_EXCL_BR_LINE Some types do not throw an exception
     367                 :          1 :     return result;
     368                 :            :   }
     369                 :            : 
     370                 :            :   /*!
     371                 :            :    * \brief conversion to base type: double
     372                 :            :    *
     373                 :            :    * \note the conversion to the base type removes the physical unit.
     374                 :            :    *       \ref \_AD_MAP_POINT_LONGITUDE_EXPLICIT_CONVERSION\_ defines, if only explicit calls are allowed.
     375                 :            :    */
     376                 :     485403 :   _AD_MAP_POINT_LONGITUDE_EXPLICIT_CONVERSION_ operator double() const
     377                 :            :   {
     378                 :     485403 :     return mLongitude;
     379                 :            :   }
     380                 :            : 
     381                 :            :   /*!
     382                 :            :    * \returns \c true if the Longitude in a valid range
     383                 :            :    *
     384                 :            :    * An Longitude value is defined to be valid if:
     385                 :            :    * - It is normal or zero (see std::fpclassify())
     386                 :            :    * - \ref cMinValue <= value <= \ref cMaxValue
     387                 :            :    */
     388                 :    5190054 :   bool isValid() const
     389                 :            :   {
     390                 :    5190054 :     auto const valueClass = std::fpclassify(mLongitude);
     391   [ +  +  +  - ]:    5190054 :     return ((valueClass == FP_NORMAL) || (valueClass == FP_ZERO)) && (cMinValue <= mLongitude)
     392   [ +  +  +  - ]:   10380148 :       && (mLongitude <= cMaxValue);
     393                 :            :   }
     394                 :            : 
     395                 :            :   /*!
     396                 :            :    * \brief ensure that the Longitude is valid
     397                 :            :    *
     398                 :            :    * Throws an std::out_of_range() exception if the Longitude
     399                 :            :    * in not valid (i.e. isValid() returns false)
     400                 :            :    */
     401                 :    4613127 :   void ensureValid() const
     402                 :            :   {
     403         [ +  + ]:    4613127 :     if (!isValid())
     404                 :            :     {
     405                 :         34 :       spdlog::info("ensureValid(::ad::map::point::Longitude)>> {} value out of range", *this); // LCOV_EXCL_BR_LINE
     406                 :            : #if (AD_MAP_POINT_LONGITUDE_THROWS_EXCEPTION == 1)
     407                 :         34 :       throw std::out_of_range("Longitude value out of range"); // LCOV_EXCL_BR_LINE
     408                 :            : #endif
     409                 :            :     }
     410                 :    4613093 :   }
     411                 :            : 
     412                 :            :   /*!
     413                 :            :    * \brief ensure that the Longitude is valid and non zero
     414                 :            :    *
     415                 :            :    * Throws an std::out_of_range() exception if the Longitude
     416                 :            :    * in not valid or zero (i.e. isValid() returns false)
     417                 :            :    */
     418                 :          9 :   void ensureValidNonZero() const
     419                 :            :   {
     420                 :          9 :     ensureValid();
     421                 :          6 :     if (operator==(Longitude(0.))) // LCOV_EXCL_BR_LINE
     422                 :            :     {
     423                 :          3 :       spdlog::info("ensureValid(::ad::map::point::Longitude)>> {} value is zero", *this); // LCOV_EXCL_BR_LINE
     424                 :            : #if (AD_MAP_POINT_LONGITUDE_THROWS_EXCEPTION == 1)
     425                 :          3 :       throw std::out_of_range("Longitude value is zero"); // LCOV_EXCL_BR_LINE
     426                 :            : #endif
     427                 :            :     }
     428                 :          3 :   }
     429                 :            : 
     430                 :            :   /*!
     431                 :            :    * \brief get minimum valid Longitude (i.e. \ref cMinValue)
     432                 :            :    */
     433                 :     576590 :   static Longitude getMin()
     434                 :            :   {
     435                 :     576590 :     return Longitude(cMinValue);
     436                 :            :   }
     437                 :            : 
     438                 :            :   /*!
     439                 :            :    * \brief get maximum valid Longitude (i.e. \ref cMaxValue)
     440                 :            :    */
     441                 :     576590 :   static Longitude getMax()
     442                 :            :   {
     443                 :     576590 :     return Longitude(cMaxValue);
     444                 :            :   }
     445                 :            : 
     446                 :            :   /*!
     447                 :            :    * \brief get assumed accuracy of Longitude (i.e. \ref cPrecisionValue)
     448                 :            :    */
     449                 :          3 :   static Longitude getPrecision()
     450                 :            :   {
     451                 :          3 :     return Longitude(cPrecisionValue);
     452                 :            :   }
     453                 :            : 
     454                 :            : private:
     455                 :            :   /*!
     456                 :            :    * \brief the actual value of the type
     457                 :            :    */
     458                 :            :   double mLongitude;
     459                 :            : };
     460                 :            : 
     461                 :            : } // namespace point
     462                 :            : } // namespace map
     463                 :            : } // namespace ad
     464                 :            : /**
     465                 :            :  * \brief standard arithmetic operator
     466                 :            :  *
     467                 :            :  * \param[in] other Other Longitude as double value
     468                 :            :  * \param[in] value Longitude value
     469                 :            :  *
     470                 :            :  * \returns Result of arithmetic operation.
     471                 :            :  *
     472                 :            :  * \note throws a std::out_of_range exception if \c value or the result of
     473                 :            :  *   the operation is not valid
     474                 :            :  */
     475                 :          5 : inline ::ad::map::point::Longitude operator*(const double &other, ::ad::map::point::Longitude const &value)
     476                 :            : {
     477                 :          5 :   return value.operator*(other);
     478                 :            : }
     479                 :            : 
     480                 :            : /*!
     481                 :            :  * \brief namespace std
     482                 :            :  */
     483                 :            : namespace std {
     484                 :            : 
     485                 :            : /*!
     486                 :            :  * \brief overload of the std::fabs for Longitude
     487                 :            :  */
     488                 :          7 : inline ::ad::map::point::Longitude fabs(const ::ad::map::point::Longitude other)
     489                 :            : {
     490                 :          7 :   ::ad::map::point::Longitude const result(std::fabs(static_cast<double>(other)));
     491                 :          7 :   return result;
     492                 :            : }
     493                 :            : 
     494                 :            : /*!
     495                 :            :  * \brief specialization of the std::numeric_limits for Longitude
     496                 :            :  *
     497                 :            :  * Derived from std::numeric_limits<double> with overloaded functions:
     498                 :            :  * std::numeric_limits<Longitude>::lowest()  (\see Longitude::getMin())
     499                 :            :  * std::numeric_limits<Longitude>::max()  (\see Longitude::getMax())
     500                 :            :  * std::numeric_limits<Longitude>::epsilon()  (\see Longitude::getPrecision())
     501                 :            :  */
     502                 :            : template <> class numeric_limits<::ad::map::point::Longitude> : public numeric_limits<double>
     503                 :            : {
     504                 :            : public:
     505                 :            :   /*!
     506                 :            :    * \see std::numeric_limits::lowest()
     507                 :            :    */
     508                 :     576588 :   static inline ::ad::map::point::Longitude lowest()
     509                 :            :   {
     510                 :     576588 :     return ::ad::map::point::Longitude::getMin();
     511                 :            :   }
     512                 :            :   /*!
     513                 :            :    * \see std::numeric_limits::max()
     514                 :            :    */
     515                 :     576588 :   static inline ::ad::map::point::Longitude max()
     516                 :            :   {
     517                 :     576588 :     return ::ad::map::point::Longitude::getMax();
     518                 :            :   }
     519                 :            : 
     520                 :            :   /*!
     521                 :            :    * \see std::numeric_limits::epsilon()
     522                 :            :    */
     523                 :          1 :   static inline ::ad::map::point::Longitude epsilon()
     524                 :            :   {
     525                 :          1 :     return ::ad::map::point::Longitude::getPrecision();
     526                 :            :   }
     527                 :            : };
     528                 :            : 
     529                 :            : } // namespace std
     530                 :            : 
     531                 :            : /*!
     532                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     533                 :            :  */
     534                 :            : #ifndef GEN_GUARD_AD_MAP_POINT_LONGITUDE
     535                 :            : #define GEN_GUARD_AD_MAP_POINT_LONGITUDE
     536                 :            : /*!
     537                 :            :  * @brief namespace ad
     538                 :            :  */
     539                 :            : namespace ad {
     540                 :            : /*!
     541                 :            :  * @brief namespace map
     542                 :            :  */
     543                 :            : namespace map {
     544                 :            : /*!
     545                 :            :  * @brief namespace point
     546                 :            :  *
     547                 :            :  * Handling geographic positions in different coordinate systems
     548                 :            :  */
     549                 :            : namespace point {
     550                 :            : 
     551                 :            : /**
     552                 :            :  * \brief standard ostream operator
     553                 :            :  *
     554                 :            :  * \param[in] os The output stream to write to
     555                 :            :  * \param[in] _value Longitude value
     556                 :            :  *
     557                 :            :  * \returns The stream object.
     558                 :            :  *
     559                 :            :  */
     560                 :        128 : inline std::ostream &operator<<(std::ostream &os, Longitude const &_value)
     561                 :            : {
     562                 :        128 :   return os << double(_value);
     563                 :            : }
     564                 :            : 
     565                 :            : } // namespace point
     566                 :            : } // namespace map
     567                 :            : } // namespace ad
     568                 :            : 
     569                 :            : namespace std {
     570                 :            : /*!
     571                 :            :  * \brief overload of the std::to_string for Longitude
     572                 :            :  */
     573                 :            : inline std::string to_string(::ad::map::point::Longitude const &value)
     574                 :            : {
     575                 :            :   return to_string(static_cast<double>(value));
     576                 :            : }
     577                 :            : } // namespace std
     578                 :            : #endif // GEN_GUARD_AD_MAP_POINT_LONGITUDE

Generated by: LCOV version 1.14