LCOV - code coverage report
Current view: top level - generated/include/ad/map/route - RouteParaPoint.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 23 23 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/route/RoutePlanningCounter.hpp"
      25                 :            : #include "ad/map/route/SegmentCounter.hpp"
      26                 :            : #include "ad/physics/ParametricValue.hpp"
      27                 :            : /*!
      28                 :            :  * @brief namespace ad
      29                 :            :  */
      30                 :            : namespace ad {
      31                 :            : /*!
      32                 :            :  * @brief namespace map
      33                 :            :  */
      34                 :            : namespace map {
      35                 :            : /*!
      36                 :            :  * @brief namespace route
      37                 :            :  *
      38                 :            :  * Handling of routes
      39                 :            :  */
      40                 :            : namespace route {
      41                 :            : 
      42                 :            : /*!
      43                 :            :  * \brief DataType RouteParaPoint
      44                 :            :  */
      45                 :            : struct RouteParaPoint
      46                 :            : {
      47                 :            :   /*!
      48                 :            :    * \brief Smart pointer on RouteParaPoint
      49                 :            :    */
      50                 :            :   typedef std::shared_ptr<RouteParaPoint> Ptr;
      51                 :            : 
      52                 :            :   /*!
      53                 :            :    * \brief Smart pointer on constant RouteParaPoint
      54                 :            :    */
      55                 :            :   typedef std::shared_ptr<RouteParaPoint const> ConstPtr;
      56                 :            : 
      57                 :            :   /*!
      58                 :            :    * \brief standard constructor
      59                 :            :    */
      60                 :         29 :   RouteParaPoint() = default;
      61                 :            : 
      62                 :            :   /*!
      63                 :            :    * \brief standard destructor
      64                 :            :    */
      65                 :            :   ~RouteParaPoint() = default;
      66                 :            : 
      67                 :            :   /*!
      68                 :            :    * \brief standard copy constructor
      69                 :            :    */
      70                 :            :   RouteParaPoint(const RouteParaPoint &other) = default;
      71                 :            : 
      72                 :            :   /*!
      73                 :            :    * \brief standard move constructor
      74                 :            :    */
      75                 :            :   RouteParaPoint(RouteParaPoint &&other) = default;
      76                 :            : 
      77                 :            :   /**
      78                 :            :    * \brief standard assignment operator
      79                 :            :    *
      80                 :            :    * \param[in] other Other RouteParaPoint
      81                 :            :    *
      82                 :            :    * \returns Reference to this RouteParaPoint.
      83                 :            :    */
      84                 :            :   RouteParaPoint &operator=(const RouteParaPoint &other) = default;
      85                 :            : 
      86                 :            :   /**
      87                 :            :    * \brief standard move operator
      88                 :            :    *
      89                 :            :    * \param[in] other Other RouteParaPoint
      90                 :            :    *
      91                 :            :    * \returns Reference to this RouteParaPoint.
      92                 :            :    */
      93                 :            :   RouteParaPoint &operator=(RouteParaPoint &&other) = default;
      94                 :            : 
      95                 :            :   /**
      96                 :            :    * \brief standard comparison operator
      97                 :            :    *
      98                 :            :    * \param[in] other Other RouteParaPoint
      99                 :            :    *
     100                 :            :    * \returns \c true if both RouteParaPoint are equal
     101                 :            :    */
     102                 :         12 :   bool operator==(const RouteParaPoint &other) const
     103                 :            :   {
     104                 :         12 :     return (routePlanningCounter == other.routePlanningCounter)
     105         [ +  + ]:         10 :       && (segmentCountFromDestination == other.segmentCountFromDestination)
     106   [ +  +  +  + ]:         22 :       && (parametricOffset == other.parametricOffset);
     107                 :            :   }
     108                 :            : 
     109                 :            :   /**
     110                 :            :    * \brief standard comparison operator
     111                 :            :    *
     112                 :            :    * \param[in] other Other RouteParaPoint.
     113                 :            :    *
     114                 :            :    * \returns \c true if both RouteParaPoint are different
     115                 :            :    */
     116                 :          4 :   bool operator!=(const RouteParaPoint &other) const
     117                 :            :   {
     118                 :          4 :     return !operator==(other);
     119                 :            :   }
     120                 :            : 
     121                 :            :   ::ad::map::route::RoutePlanningCounter routePlanningCounter{0u};
     122                 :            :   ::ad::map::route::SegmentCounter segmentCountFromDestination{0};
     123                 :            : 
     124                 :            :   /*!
     125                 :            :    * The parametric offset in the range of [0;1] within the lane's geometry as defined
     126                 :            :    * in the map.
     127                 :            :    * 0.0 refers to the start of the lanes points.
     128                 :            :    * 1.0 refers to the end of the lanes points.
     129                 :            :    * 0.5 refers to in between at half length of the lane.
     130                 :            :    * Be aware: Depending on the route direction on the lane either the parametric offset
     131                 :            :    * 0.0 or 1.0 can define the start point of that route on that lane.
     132                 :            :    */
     133                 :            :   ::ad::physics::ParametricValue parametricOffset;
     134                 :            : };
     135                 :            : 
     136                 :            : } // namespace route
     137                 :            : } // namespace map
     138                 :            : } // namespace ad
     139                 :            : 
     140                 :            : /*!
     141                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     142                 :            :  */
     143                 :            : #ifndef GEN_GUARD_AD_MAP_ROUTE_ROUTEPARAPOINT
     144                 :            : #define GEN_GUARD_AD_MAP_ROUTE_ROUTEPARAPOINT
     145                 :            : /*!
     146                 :            :  * @brief namespace ad
     147                 :            :  */
     148                 :            : namespace ad {
     149                 :            : /*!
     150                 :            :  * @brief namespace map
     151                 :            :  */
     152                 :            : namespace map {
     153                 :            : /*!
     154                 :            :  * @brief namespace route
     155                 :            :  *
     156                 :            :  * Handling of routes
     157                 :            :  */
     158                 :            : namespace route {
     159                 :            : 
     160                 :            : /**
     161                 :            :  * \brief standard ostream operator
     162                 :            :  *
     163                 :            :  * \param[in] os The output stream to write to
     164                 :            :  * \param[in] _value RouteParaPoint value
     165                 :            :  *
     166                 :            :  * \returns The stream object.
     167                 :            :  *
     168                 :            :  */
     169                 :          5 : inline std::ostream &operator<<(std::ostream &os, RouteParaPoint const &_value)
     170                 :            : {
     171                 :          5 :   os << "RouteParaPoint(";
     172                 :          5 :   os << "routePlanningCounter:";
     173                 :          5 :   os << _value.routePlanningCounter;
     174                 :          5 :   os << ",";
     175                 :          5 :   os << "segmentCountFromDestination:";
     176                 :          5 :   os << _value.segmentCountFromDestination;
     177                 :          5 :   os << ",";
     178                 :          5 :   os << "parametricOffset:";
     179                 :          5 :   os << _value.parametricOffset;
     180                 :          5 :   os << ")";
     181                 :          5 :   return os;
     182                 :            : }
     183                 :            : 
     184                 :            : } // namespace route
     185                 :            : } // namespace map
     186                 :            : } // namespace ad
     187                 :            : 
     188                 :            : namespace std {
     189                 :            : /*!
     190                 :            :  * \brief overload of the std::to_string for RouteParaPoint
     191                 :            :  */
     192                 :          1 : inline std::string to_string(::ad::map::route::RouteParaPoint const &value)
     193                 :            : {
     194         [ +  - ]:          2 :   stringstream sstream;
     195         [ +  - ]:          1 :   sstream << value;
     196         [ +  - ]:          2 :   return sstream.str();
     197                 :            : }
     198                 :            : } // namespace std
     199                 :            : #endif // GEN_GUARD_AD_MAP_ROUTE_ROUTEPARAPOINT

Generated by: LCOV version 1.14