LCOV - code coverage report
Current view: top level - generated/include/ad/map/point - Geometry.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 32 32 100.0 %
Date: 2022-10-04 09:48:07 Functions: 10 10 100.0 %
Branches: 14 18 77.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 <iostream>
      21                 :            : #include <limits>
      22                 :            : #include <memory>
      23                 :            : #include <sstream>
      24                 :            : #include "ad/map/point/ECEFEdge.hpp"
      25                 :            : #include "ad/map/point/ENUEdgeCache.hpp"
      26                 :            : #include "ad/physics/Distance.hpp"
      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 DataType Geometry
      44                 :            :  */
      45                 :     101810 : struct Geometry
      46                 :            : {
      47                 :            :   /*!
      48                 :            :    * \brief Smart pointer on Geometry
      49                 :            :    */
      50                 :            :   typedef std::shared_ptr<Geometry> Ptr;
      51                 :            : 
      52                 :            :   /*!
      53                 :            :    * \brief Smart pointer on constant Geometry
      54                 :            :    */
      55                 :            :   typedef std::shared_ptr<Geometry const> ConstPtr;
      56                 :            : 
      57                 :            :   /*!
      58                 :            :    * \brief standard constructor
      59                 :            :    */
      60                 :     231745 :   Geometry() = default;
      61                 :            : 
      62                 :            :   /*!
      63                 :            :    * \brief standard destructor
      64                 :            :    */
      65                 :     726521 :   ~Geometry() = default;
      66                 :            : 
      67                 :            :   /*!
      68                 :            :    * \brief standard copy constructor
      69                 :            :    */
      70         [ +  - ]:     494772 :   Geometry(const Geometry &other) = default;
      71                 :            : 
      72                 :            :   /*!
      73                 :            :    * \brief standard move constructor
      74                 :            :    */
      75                 :          4 :   Geometry(Geometry &&other) = default;
      76                 :            : 
      77                 :            :   /**
      78                 :            :    * \brief standard assignment operator
      79                 :            :    *
      80                 :            :    * \param[in] other Other Geometry
      81                 :            :    *
      82                 :            :    * \returns Reference to this Geometry.
      83                 :            :    */
      84                 :            :   Geometry &operator=(const Geometry &other) = default;
      85                 :            : 
      86                 :            :   /**
      87                 :            :    * \brief standard move operator
      88                 :            :    *
      89                 :            :    * \param[in] other Other Geometry
      90                 :            :    *
      91                 :            :    * \returns Reference to this Geometry.
      92                 :            :    */
      93                 :            :   Geometry &operator=(Geometry &&other) = default;
      94                 :            : 
      95                 :            :   /**
      96                 :            :    * \brief standard comparison operator
      97                 :            :    *
      98                 :            :    * \param[in] other Other Geometry
      99                 :            :    *
     100                 :            :    * \returns \c true if both Geometry are equal
     101                 :            :    */
     102                 :         83 :   bool operator==(const Geometry &other) const
     103                 :            :   {
     104   [ +  +  +  + ]:         75 :     return (isValid == other.isValid) && (isClosed == other.isClosed) && (ecefEdge == other.ecefEdge)
     105   [ +  +  +  +  :        158 :       && (length == other.length) && (private_enuEdgeCache == other.private_enuEdgeCache);
                   +  + ]
     106                 :            :   }
     107                 :            : 
     108                 :            :   /**
     109                 :            :    * \brief standard comparison operator
     110                 :            :    *
     111                 :            :    * \param[in] other Other Geometry.
     112                 :            :    *
     113                 :            :    * \returns \c true if both Geometry are different
     114                 :            :    */
     115                 :         12 :   bool operator!=(const Geometry &other) const
     116                 :            :   {
     117                 :         12 :     return !operator==(other);
     118                 :            :   }
     119                 :            : 
     120                 :            :   bool isValid{false};
     121                 :            :   bool isClosed{false};
     122                 :            :   ::ad::map::point::ECEFEdge ecefEdge;
     123                 :            :   ::ad::physics::Distance length;
     124                 :            : 
     125                 :            :   /*!
     126                 :            :    * Private member storing the ecefEdge as enuEdge.
     127                 :            :    * Access this member only through respective interface functions to ensure the cache
     128                 :            :    * is updated when required.
     129                 :            :    */
     130                 :            :   ::ad::map::point::ENUEdgeCache private_enuEdgeCache;
     131                 :            : };
     132                 :            : 
     133                 :            : } // namespace point
     134                 :            : } // namespace map
     135                 :            : } // namespace ad
     136                 :            : 
     137                 :            : /*!
     138                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     139                 :            :  */
     140                 :            : #ifndef GEN_GUARD_AD_MAP_POINT_GEOMETRY
     141                 :            : #define GEN_GUARD_AD_MAP_POINT_GEOMETRY
     142                 :            : /*!
     143                 :            :  * @brief namespace ad
     144                 :            :  */
     145                 :            : namespace ad {
     146                 :            : /*!
     147                 :            :  * @brief namespace map
     148                 :            :  */
     149                 :            : namespace map {
     150                 :            : /*!
     151                 :            :  * @brief namespace point
     152                 :            :  *
     153                 :            :  * Handling geographic positions in different coordinate systems
     154                 :            :  */
     155                 :            : namespace point {
     156                 :            : 
     157                 :            : /**
     158                 :            :  * \brief standard ostream operator
     159                 :            :  *
     160                 :            :  * \param[in] os The output stream to write to
     161                 :            :  * \param[in] _value Geometry value
     162                 :            :  *
     163                 :            :  * \returns The stream object.
     164                 :            :  *
     165                 :            :  */
     166                 :         69 : inline std::ostream &operator<<(std::ostream &os, Geometry const &_value)
     167                 :            : {
     168                 :         69 :   os << "Geometry(";
     169                 :         69 :   os << "isValid:";
     170                 :         69 :   os << _value.isValid;
     171                 :         69 :   os << ",";
     172                 :         69 :   os << "isClosed:";
     173                 :         69 :   os << _value.isClosed;
     174                 :         69 :   os << ",";
     175                 :         69 :   os << "ecefEdge:";
     176                 :         69 :   os << _value.ecefEdge;
     177                 :         69 :   os << ",";
     178                 :         69 :   os << "length:";
     179                 :         69 :   os << _value.length;
     180                 :         69 :   os << ",";
     181                 :         69 :   os << "private_enuEdgeCache:";
     182                 :         69 :   os << _value.private_enuEdgeCache;
     183                 :         69 :   os << ")";
     184                 :         69 :   return os;
     185                 :            : }
     186                 :            : 
     187                 :            : } // namespace point
     188                 :            : } // namespace map
     189                 :            : } // namespace ad
     190                 :            : 
     191                 :            : namespace std {
     192                 :            : /*!
     193                 :            :  * \brief overload of the std::to_string for Geometry
     194                 :            :  */
     195                 :          1 : inline std::string to_string(::ad::map::point::Geometry const &value)
     196                 :            : {
     197         [ +  - ]:          2 :   stringstream sstream;
     198         [ +  - ]:          1 :   sstream << value;
     199         [ +  - ]:          2 :   return sstream.str();
     200                 :            : }
     201                 :            : } // namespace std
     202                 :            : #endif // GEN_GUARD_AD_MAP_POINT_GEOMETRY

Generated by: LCOV version 1.14