LCOV - code coverage report
Current view: top level - generated/include/ad/map/match - MapMatchedPosition.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 32 32 100.0 %
Date: 2022-10-04 09:48:07 Functions: 5 5 100.0 %
Branches: 15 18 83.3 %

           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/match/LanePoint.hpp"
      25                 :            : #include "ad/map/match/MapMatchedPositionType.hpp"
      26                 :            : #include "ad/map/point/ECEFPoint.hpp"
      27                 :            : #include "ad/physics/Distance.hpp"
      28                 :            : #include "ad/physics/Probability.hpp"
      29                 :            : /*!
      30                 :            :  * @brief namespace ad
      31                 :            :  */
      32                 :            : namespace ad {
      33                 :            : /*!
      34                 :            :  * @brief namespace map
      35                 :            :  */
      36                 :            : namespace map {
      37                 :            : /*!
      38                 :            :  * @brief namespace match
      39                 :            :  *
      40                 :            :  * Map matching
      41                 :            :  */
      42                 :            : namespace match {
      43                 :            : 
      44                 :            : /*!
      45                 :            :  * \brief DataType MapMatchedPosition
      46                 :            :  *
      47                 :            :  * A map matched position
      48                 :            :  */
      49                 :            : struct MapMatchedPosition
      50                 :            : {
      51                 :            :   /*!
      52                 :            :    * \brief Smart pointer on MapMatchedPosition
      53                 :            :    */
      54                 :            :   typedef std::shared_ptr<MapMatchedPosition> Ptr;
      55                 :            : 
      56                 :            :   /*!
      57                 :            :    * \brief Smart pointer on constant MapMatchedPosition
      58                 :            :    */
      59                 :            :   typedef std::shared_ptr<MapMatchedPosition const> ConstPtr;
      60                 :            : 
      61                 :            :   /*!
      62                 :            :    * \brief standard constructor
      63                 :            :    */
      64                 :     938199 :   MapMatchedPosition() = default;
      65                 :            : 
      66                 :            :   /*!
      67                 :            :    * \brief standard destructor
      68                 :            :    */
      69                 :            :   ~MapMatchedPosition() = default;
      70                 :            : 
      71                 :            :   /*!
      72                 :            :    * \brief standard copy constructor
      73                 :            :    */
      74                 :            :   MapMatchedPosition(const MapMatchedPosition &other) = default;
      75                 :            : 
      76                 :            :   /*!
      77                 :            :    * \brief standard move constructor
      78                 :            :    */
      79                 :            :   MapMatchedPosition(MapMatchedPosition &&other) = default;
      80                 :            : 
      81                 :            :   /**
      82                 :            :    * \brief standard assignment operator
      83                 :            :    *
      84                 :            :    * \param[in] other Other MapMatchedPosition
      85                 :            :    *
      86                 :            :    * \returns Reference to this MapMatchedPosition.
      87                 :            :    */
      88                 :            :   MapMatchedPosition &operator=(const MapMatchedPosition &other) = default;
      89                 :            : 
      90                 :            :   /**
      91                 :            :    * \brief standard move operator
      92                 :            :    *
      93                 :            :    * \param[in] other Other MapMatchedPosition
      94                 :            :    *
      95                 :            :    * \returns Reference to this MapMatchedPosition.
      96                 :            :    */
      97                 :            :   MapMatchedPosition &operator=(MapMatchedPosition &&other) = default;
      98                 :            : 
      99                 :            :   /**
     100                 :            :    * \brief standard comparison operator
     101                 :            :    *
     102                 :            :    * \param[in] other Other MapMatchedPosition
     103                 :            :    *
     104                 :            :    * \returns \c true if both MapMatchedPosition are equal
     105                 :            :    */
     106                 :         34 :   bool operator==(const MapMatchedPosition &other) const
     107                 :            :   {
     108   [ +  +  +  + ]:         66 :     return (lanePoint == other.lanePoint) && (type == other.type) && (matchedPoint == other.matchedPoint)
     109   [ +  +  +  + ]:         28 :       && (probability == other.probability) && (queryPoint == other.queryPoint)
     110   [ +  +  +  + ]:         66 :       && (matchedPointDistance == other.matchedPointDistance);
     111                 :            :   }
     112                 :            : 
     113                 :            :   /**
     114                 :            :    * \brief standard comparison operator
     115                 :            :    *
     116                 :            :    * \param[in] other Other MapMatchedPosition.
     117                 :            :    *
     118                 :            :    * \returns \c true if both MapMatchedPosition are different
     119                 :            :    */
     120                 :          7 :   bool operator!=(const MapMatchedPosition &other) const
     121                 :            :   {
     122                 :          7 :     return !operator==(other);
     123                 :            :   }
     124                 :            : 
     125                 :            :   /*!
     126                 :            :    * matched point as LanePoint.
     127                 :            :    * parametricOffset
     128                 :            :    */
     129                 :            :   ::ad::map::match::LanePoint lanePoint;
     130                 :            :   ::ad::map::match::MapMatchedPositionType type{::ad::map::match::MapMatchedPositionType::INVALID};
     131                 :            :   ::ad::map::point::ECEFPoint matchedPoint;
     132                 :            :   ::ad::physics::Probability probability;
     133                 :            : 
     134                 :            :   /*!
     135                 :            :    * Point that is used for determining this matched pos.
     136                 :            :    */
     137                 :            :   ::ad::map::point::ECEFPoint queryPoint;
     138                 :            : 
     139                 :            :   /*!
     140                 :            :    * The distance between the matchedPoint and the queryPoint.
     141                 :            :    */
     142                 :            :   ::ad::physics::Distance matchedPointDistance;
     143                 :            : };
     144                 :            : 
     145                 :            : } // namespace match
     146                 :            : } // namespace map
     147                 :            : } // namespace ad
     148                 :            : 
     149                 :            : /*!
     150                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     151                 :            :  */
     152                 :            : #ifndef GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDPOSITION
     153                 :            : #define GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDPOSITION
     154                 :            : /*!
     155                 :            :  * @brief namespace ad
     156                 :            :  */
     157                 :            : namespace ad {
     158                 :            : /*!
     159                 :            :  * @brief namespace map
     160                 :            :  */
     161                 :            : namespace map {
     162                 :            : /*!
     163                 :            :  * @brief namespace match
     164                 :            :  *
     165                 :            :  * Map matching
     166                 :            :  */
     167                 :            : namespace match {
     168                 :            : 
     169                 :            : /**
     170                 :            :  * \brief standard ostream operator
     171                 :            :  *
     172                 :            :  * \param[in] os The output stream to write to
     173                 :            :  * \param[in] _value MapMatchedPosition value
     174                 :            :  *
     175                 :            :  * \returns The stream object.
     176                 :            :  *
     177                 :            :  */
     178                 :         30 : inline std::ostream &operator<<(std::ostream &os, MapMatchedPosition const &_value)
     179                 :            : {
     180                 :         30 :   os << "MapMatchedPosition(";
     181                 :         30 :   os << "lanePoint:";
     182                 :         30 :   os << _value.lanePoint;
     183                 :         30 :   os << ",";
     184                 :         30 :   os << "type:";
     185                 :         30 :   os << _value.type;
     186                 :         30 :   os << ",";
     187                 :         30 :   os << "matchedPoint:";
     188                 :         30 :   os << _value.matchedPoint;
     189                 :         30 :   os << ",";
     190                 :         30 :   os << "probability:";
     191                 :         30 :   os << _value.probability;
     192                 :         30 :   os << ",";
     193                 :         30 :   os << "queryPoint:";
     194                 :         30 :   os << _value.queryPoint;
     195                 :         30 :   os << ",";
     196                 :         30 :   os << "matchedPointDistance:";
     197                 :         30 :   os << _value.matchedPointDistance;
     198                 :         30 :   os << ")";
     199                 :         30 :   return os;
     200                 :            : }
     201                 :            : 
     202                 :            : } // namespace match
     203                 :            : } // namespace map
     204                 :            : } // namespace ad
     205                 :            : 
     206                 :            : namespace std {
     207                 :            : /*!
     208                 :            :  * \brief overload of the std::to_string for MapMatchedPosition
     209                 :            :  */
     210                 :          1 : inline std::string to_string(::ad::map::match::MapMatchedPosition const &value)
     211                 :            : {
     212         [ +  - ]:          2 :   stringstream sstream;
     213         [ +  - ]:          1 :   sstream << value;
     214         [ +  - ]:          2 :   return sstream.str();
     215                 :            : }
     216                 :            : } // namespace std
     217                 :            : #endif // GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDPOSITION

Generated by: LCOV version 1.14