LCOV - code coverage report
Current view: top level - generated/include/ad/rss/map - RssRoute.hpp (source / functions) Hit Total Coverage
Test: ad_rss_map_integration Lines: 43 43 100.0 %
Date: 2025-07-22 06:56:19 Functions: 11 11 100.0 %
Branches: 17 24 70.8 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
       3                 :            :  *
       4                 :            :  * Copyright (C) 2018-2022 Intel Corporation
       5                 :            :  *
       6                 :            :  * SPDX-License-Identifier: LGPL-2.1-only
       7                 :            :  *
       8                 :            :  * ----------------- END LICENSE BLOCK -----------------------------------
       9                 :            :  */
      10                 :            : 
      11                 :            : /**
      12                 :            :  * Generated file
      13                 :            :  * @file
      14                 :            :  *
      15                 :            :  * Generator Version : 11.0.0-2046
      16                 :            :  */
      17                 :            : 
      18                 :            : #pragma once
      19                 :            : 
      20                 :            : #include <iostream>
      21                 :            : #include <limits>
      22                 :            : #include <memory>
      23                 :            : #include <sstream>
      24                 :            : #include "ad/map/route/FullRoute.hpp"
      25                 :            : #include "ad/physics/Distance.hpp"
      26                 :            : #include "ad/physics/Probability.hpp"
      27                 :            : #include "ad/rss/map/RssEgoVehicleDynamicsOnRoute.hpp"
      28                 :            : #include "ad/rss/map/RssObjectDataOnRoute.hpp"
      29                 :            : #include "ad/rss/map/RssRouteId.hpp"
      30                 :            : /*!
      31                 :            :  * @brief namespace ad
      32                 :            :  */
      33                 :            : namespace ad {
      34                 :            : /*!
      35                 :            :  * @brief namespace rss
      36                 :            :  */
      37                 :            : namespace rss {
      38                 :            : /*!
      39                 :            :  * @brief namespace map
      40                 :            :  */
      41                 :            : namespace map {
      42                 :            : 
      43                 :            : /*!
      44                 :            :  * \brief DataType RssRoute
      45                 :            :  *
      46                 :            :  * The route used for RSS analysis
      47                 :            :  */
      48                 :            : struct RssRoute
      49                 :            : {
      50                 :            :   /*!
      51                 :            :    * \brief Smart pointer on RssRoute
      52                 :            :    */
      53                 :            :   typedef std::shared_ptr<RssRoute> Ptr;
      54                 :            : 
      55                 :            :   /*!
      56                 :            :    * \brief Smart pointer on constant RssRoute
      57                 :            :    */
      58                 :            :   typedef std::shared_ptr<RssRoute const> ConstPtr;
      59                 :            : 
      60                 :            :   /*!
      61                 :            :    * \brief standard constructor
      62                 :            :    */
      63   [ #  #  #  # ]:        349 :   RssRoute() = default;
      64                 :            : 
      65                 :            :   /*!
      66                 :            :    * \brief standard destructor
      67                 :            :    */
      68                 :        884 :   ~RssRoute() = default;
      69                 :            : 
      70                 :            :   /*!
      71                 :            :    * \brief standard copy constructor
      72                 :            :    */
      73                 :        492 :   RssRoute(const RssRoute &other) = default;
      74                 :            : 
      75                 :            :   /*!
      76                 :            :    * \brief standard move constructor
      77                 :            :    */
      78                 :         43 :   RssRoute(RssRoute &&other) = default;
      79                 :            : 
      80                 :            :   /**
      81                 :            :    * \brief standard assignment operator
      82                 :            :    *
      83                 :            :    * \param[in] other Other RssRoute
      84                 :            :    *
      85                 :            :    * \returns Reference to this RssRoute.
      86                 :            :    */
      87                 :         98 :   RssRoute &operator=(const RssRoute &other) = default;
      88                 :            : 
      89                 :            :   /**
      90                 :            :    * \brief standard move operator
      91                 :            :    *
      92                 :            :    * \param[in] other Other RssRoute
      93                 :            :    *
      94                 :            :    * \returns Reference to this RssRoute.
      95                 :            :    */
      96                 :         25 :   RssRoute &operator=(RssRoute &&other) = default;
      97                 :            : 
      98                 :            :   /**
      99                 :            :    * \brief standard comparison operator
     100                 :            :    *
     101                 :            :    * \param[in] other Other RssRoute
     102                 :            :    *
     103                 :            :    * \returns \c true if both RssRoute are equal
     104                 :            :    */
     105                 :         46 :   bool operator==(const RssRoute &other) const
     106                 :            :   {
     107   [ +  +  +  + ]:         42 :     return (route_id == other.route_id) && (route == other.route) && (likelihood == other.likelihood)
     108   [ +  +  +  + ]:         38 :       && (vehicle_dynamics_on_route == other.vehicle_dynamics_on_route) && (parent_route_id == other.parent_route_id)
     109   [ +  +  +  +  :         88 :       && (progress_on_route == other.progress_on_route) && (object_data_on_route == other.object_data_on_route);
                   +  + ]
     110                 :            :   }
     111                 :            : 
     112                 :            :   /**
     113                 :            :    * \brief standard comparison operator
     114                 :            :    *
     115                 :            :    * \param[in] other Other RssRoute.
     116                 :            :    *
     117                 :            :    * \returns \c true if both RssRoute are different
     118                 :            :    */
     119                 :          8 :   bool operator!=(const RssRoute &other) const
     120                 :            :   {
     121                 :          8 :     return !operator==(other);
     122                 :            :   }
     123                 :            : 
     124                 :            :   /*!
     125                 :            :    * The id of the route. Unique for a specific vehicle.
     126                 :            :    */
     127                 :            :   ::ad::rss::map::RssRouteId route_id{0};
     128                 :            : 
     129                 :            :   /*!
     130                 :            :    * The actual route.
     131                 :            :    */
     132                 :            :   ::ad::map::route::FullRoute route;
     133                 :            : 
     134                 :            :   /*!
     135                 :            :    * The likelihood of a route.
     136                 :            :    */
     137                 :            :   ::ad::physics::Probability likelihood{0.0};
     138                 :            : 
     139                 :            :   /*!
     140                 :            :    * The vehicle dynamics on the route. This entry is only present for vehicles that are handeled as ego vehicle.
     141                 :            :    */
     142                 :            :   ::ad::rss::map::RssEgoVehicleDynamicsOnRoute vehicle_dynamics_on_route;
     143                 :            : 
     144                 :            :   /*!
     145                 :            :    * In cases this route was created based on the extension of another route, that parent route id is stored here to be
     146                 :            :    * able to track route progress.
     147                 :            :    */
     148                 :            :   ::ad::rss::map::RssRouteId parent_route_id{0};
     149                 :            : 
     150                 :            :   /*!
     151                 :            :    * To keep track of the progress of the vehicle within the route.
     152                 :            :    */
     153                 :            :   ::ad::physics::Distance progress_on_route;
     154                 :            : 
     155                 :            :   /*!
     156                 :            :    * The object data in respect to the route
     157                 :            :    */
     158                 :            :   ::ad::rss::map::RssObjectDataOnRoute object_data_on_route;
     159                 :            : };
     160                 :            : 
     161                 :            : } // namespace map
     162                 :            : } // namespace rss
     163                 :            : } // namespace ad
     164                 :            : 
     165                 :            : /*!
     166                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     167                 :            :  */
     168                 :            : #ifndef GEN_GUARD_AD_RSS_MAP_RSSROUTE
     169                 :            : #define GEN_GUARD_AD_RSS_MAP_RSSROUTE
     170                 :            : /*!
     171                 :            :  * @brief namespace ad
     172                 :            :  */
     173                 :            : namespace ad {
     174                 :            : /*!
     175                 :            :  * @brief namespace rss
     176                 :            :  */
     177                 :            : namespace rss {
     178                 :            : /*!
     179                 :            :  * @brief namespace map
     180                 :            :  */
     181                 :            : namespace map {
     182                 :            : 
     183                 :            : /**
     184                 :            :  * \brief standard ostream operator
     185                 :            :  *
     186                 :            :  * \param[in] os The output stream to write to
     187                 :            :  * \param[in] _value RssRoute value
     188                 :            :  *
     189                 :            :  * \returns The stream object.
     190                 :            :  *
     191                 :            :  */
     192                 :         39 : inline std::ostream &operator<<(std::ostream &os, RssRoute const &_value)
     193                 :            : {
     194                 :         39 :   os << "RssRoute(";
     195                 :         39 :   os << "route_id:";
     196                 :         39 :   os << _value.route_id;
     197                 :         39 :   os << ",";
     198                 :         39 :   os << "route:";
     199                 :         39 :   os << _value.route;
     200                 :         39 :   os << ",";
     201                 :         39 :   os << "likelihood:";
     202                 :         39 :   os << _value.likelihood;
     203                 :         39 :   os << ",";
     204                 :         39 :   os << "vehicle_dynamics_on_route:";
     205                 :         39 :   os << _value.vehicle_dynamics_on_route;
     206                 :         39 :   os << ",";
     207                 :         39 :   os << "parent_route_id:";
     208                 :         39 :   os << _value.parent_route_id;
     209                 :         39 :   os << ",";
     210                 :         39 :   os << "progress_on_route:";
     211                 :         39 :   os << _value.progress_on_route;
     212                 :         39 :   os << ",";
     213                 :         39 :   os << "object_data_on_route:";
     214                 :         39 :   os << _value.object_data_on_route;
     215                 :         39 :   os << ")";
     216                 :         39 :   return os;
     217                 :            : }
     218                 :            : 
     219                 :            : } // namespace map
     220                 :            : } // namespace rss
     221                 :            : } // namespace ad
     222                 :            : 
     223                 :            : namespace std {
     224                 :            : /*!
     225                 :            :  * \brief overload of the std::to_string for RssRoute
     226                 :            :  */
     227                 :         18 : inline std::string to_string(::ad::rss::map::RssRoute const &value)
     228                 :            : {
     229         [ +  - ]:         18 :   stringstream sstream;
     230         [ +  - ]:         18 :   sstream << value;
     231         [ +  - ]:         36 :   return sstream.str();
     232                 :         18 : }
     233                 :            : } // namespace std
     234                 :            : 
     235                 :            : /*!
     236                 :            :  * \brief overload of fmt::formatter calling std::to_string
     237                 :            :  */
     238                 :            : template <> struct fmt::formatter<::ad::rss::map::RssRoute> : formatter<string_view>
     239                 :            : {
     240                 :         17 :   template <typename FormatContext> auto format(::ad::rss::map::RssRoute const &value, FormatContext &ctx)
     241                 :            :   {
     242                 :         34 :     return formatter<string_view>::format(std::to_string(value), ctx);
     243                 :            :   }
     244                 :            : };
     245                 :            : 
     246                 :            : #endif // GEN_GUARD_AD_RSS_MAP_RSSROUTE

Generated by: LCOV version 1.14