LCOV - code coverage report
Current view: top level - generated/include/ad/map/point - ECEFPoint.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 21 21 100.0 %
Date: 2022-10-04 09:48:07 Functions: 5 5 100.0 %
Branches: 9 12 75.0 %

           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 <iostream>
      21                 :            : #include <limits>
      22                 :            : #include <memory>
      23                 :            : #include <sstream>
      24                 :            : #include "ad/map/point/ECEFCoordinate.hpp"
      25                 :            : /*!
      26                 :            :  * @brief namespace ad
      27                 :            :  */
      28                 :            : namespace ad {
      29                 :            : /*!
      30                 :            :  * @brief namespace map
      31                 :            :  */
      32                 :            : namespace map {
      33                 :            : /*!
      34                 :            :  * @brief namespace point
      35                 :            :  *
      36                 :            :  * Handling geographic positions in different coordinate systems
      37                 :            :  */
      38                 :            : namespace point {
      39                 :            : 
      40                 :            : /*!
      41                 :            :  * \brief DataType ECEFPoint
      42                 :            :  *
      43                 :            :  * A geographical location in ECEF coordinate system
      44                 :            :  */
      45                 :            : struct ECEFPoint
      46                 :            : {
      47                 :            :   /*!
      48                 :            :    * \brief Smart pointer on ECEFPoint
      49                 :            :    */
      50                 :            :   typedef std::shared_ptr<ECEFPoint> Ptr;
      51                 :            : 
      52                 :            :   /*!
      53                 :            :    * \brief Smart pointer on constant ECEFPoint
      54                 :            :    */
      55                 :            :   typedef std::shared_ptr<ECEFPoint const> ConstPtr;
      56                 :            : 
      57                 :            :   /*!
      58                 :            :    * \brief standard constructor
      59                 :            :    */
      60                 :  164575999 :   ECEFPoint() = default;
      61                 :            : 
      62                 :            :   /*!
      63                 :            :    * \brief standard destructor
      64                 :            :    */
      65                 :            :   ~ECEFPoint() = default;
      66                 :            : 
      67                 :            :   /*!
      68                 :            :    * \brief standard copy constructor
      69                 :            :    */
      70                 :            :   ECEFPoint(const ECEFPoint &other) = default;
      71                 :            : 
      72                 :            :   /*!
      73                 :            :    * \brief standard move constructor
      74                 :            :    */
      75                 :            :   ECEFPoint(ECEFPoint &&other) = default;
      76                 :            : 
      77                 :            :   /**
      78                 :            :    * \brief standard assignment operator
      79                 :            :    *
      80                 :            :    * \param[in] other Other ECEFPoint
      81                 :            :    *
      82                 :            :    * \returns Reference to this ECEFPoint.
      83                 :            :    */
      84                 :            :   ECEFPoint &operator=(const ECEFPoint &other) = default;
      85                 :            : 
      86                 :            :   /**
      87                 :            :    * \brief standard move operator
      88                 :            :    *
      89                 :            :    * \param[in] other Other ECEFPoint
      90                 :            :    *
      91                 :            :    * \returns Reference to this ECEFPoint.
      92                 :            :    */
      93                 :            :   ECEFPoint &operator=(ECEFPoint &&other) = default;
      94                 :            : 
      95                 :            :   /**
      96                 :            :    * \brief standard comparison operator
      97                 :            :    *
      98                 :            :    * \param[in] other Other ECEFPoint
      99                 :            :    *
     100                 :            :    * \returns \c true if both ECEFPoint are equal
     101                 :            :    */
     102                 :      43449 :   bool operator==(const ECEFPoint &other) const
     103                 :            :   {
     104   [ +  +  +  +  :      43449 :     return (x == other.x) && (y == other.y) && (z == other.z);
                   +  + ]
     105                 :            :   }
     106                 :            : 
     107                 :            :   /**
     108                 :            :    * \brief standard comparison operator
     109                 :            :    *
     110                 :            :    * \param[in] other Other ECEFPoint.
     111                 :            :    *
     112                 :            :    * \returns \c true if both ECEFPoint are different
     113                 :            :    */
     114                 :          4 :   bool operator!=(const ECEFPoint &other) const
     115                 :            :   {
     116                 :          4 :     return !operator==(other);
     117                 :            :   }
     118                 :            : 
     119                 :            :   /*!
     120                 :            :    * The x component of the point
     121                 :            :    */
     122                 :            :   ::ad::map::point::ECEFCoordinate x{std::numeric_limits<double>::quiet_NaN()};
     123                 :            : 
     124                 :            :   /*!
     125                 :            :    * The y component of the point
     126                 :            :    */
     127                 :            :   ::ad::map::point::ECEFCoordinate y{std::numeric_limits<double>::quiet_NaN()};
     128                 :            : 
     129                 :            :   /*!
     130                 :            :    * The z component of the point
     131                 :            :    */
     132                 :            :   ::ad::map::point::ECEFCoordinate z{std::numeric_limits<double>::quiet_NaN()};
     133                 :            : };
     134                 :            : 
     135                 :            : } // namespace point
     136                 :            : } // namespace map
     137                 :            : } // namespace ad
     138                 :            : 
     139                 :            : /*!
     140                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     141                 :            :  */
     142                 :            : #ifndef GEN_GUARD_AD_MAP_POINT_ECEFPOINT
     143                 :            : #define GEN_GUARD_AD_MAP_POINT_ECEFPOINT
     144                 :            : /*!
     145                 :            :  * @brief namespace ad
     146                 :            :  */
     147                 :            : namespace ad {
     148                 :            : /*!
     149                 :            :  * @brief namespace map
     150                 :            :  */
     151                 :            : namespace map {
     152                 :            : /*!
     153                 :            :  * @brief namespace point
     154                 :            :  *
     155                 :            :  * Handling geographic positions in different coordinate systems
     156                 :            :  */
     157                 :            : namespace point {
     158                 :            : 
     159                 :            : /**
     160                 :            :  * \brief standard ostream operator
     161                 :            :  *
     162                 :            :  * \param[in] os The output stream to write to
     163                 :            :  * \param[in] _value ECEFPoint value
     164                 :            :  *
     165                 :            :  * \returns The stream object.
     166                 :            :  *
     167                 :            :  */
     168                 :        245 : inline std::ostream &operator<<(std::ostream &os, ECEFPoint const &_value)
     169                 :            : {
     170                 :        245 :   os << "ECEFPoint(";
     171                 :        245 :   os << "x:";
     172                 :        245 :   os << _value.x;
     173                 :        245 :   os << ",";
     174                 :        245 :   os << "y:";
     175                 :        245 :   os << _value.y;
     176                 :        245 :   os << ",";
     177                 :        245 :   os << "z:";
     178                 :        245 :   os << _value.z;
     179                 :        245 :   os << ")";
     180                 :        245 :   return os;
     181                 :            : }
     182                 :            : 
     183                 :            : } // namespace point
     184                 :            : } // namespace map
     185                 :            : } // namespace ad
     186                 :            : 
     187                 :            : namespace std {
     188                 :            : /*!
     189                 :            :  * \brief overload of the std::to_string for ECEFPoint
     190                 :            :  */
     191                 :          1 : inline std::string to_string(::ad::map::point::ECEFPoint const &value)
     192                 :            : {
     193         [ +  - ]:          2 :   stringstream sstream;
     194         [ +  - ]:          1 :   sstream << value;
     195         [ +  - ]:          2 :   return sstream.str();
     196                 :            : }
     197                 :            : } // namespace std
     198                 :            : #endif // GEN_GUARD_AD_MAP_POINT_ECEFPOINT

Generated by: LCOV version 1.14