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

           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 <memory>
      22                 :            : #include <sstream>
      23                 :            : #include "spdlog/fmt/ostr.h"
      24                 :            : #include "spdlog/spdlog.h"
      25                 :            : /*!
      26                 :            :  * @brief namespace ad
      27                 :            :  */
      28                 :            : namespace ad {
      29                 :            : /*!
      30                 :            :  * @brief namespace rss
      31                 :            :  */
      32                 :            : namespace rss {
      33                 :            : /*!
      34                 :            :  * @brief namespace map
      35                 :            :  */
      36                 :            : namespace map {
      37                 :            : 
      38                 :            : /*!
      39                 :            :  * \brief DataType RssRouteCheckResultAnalysis
      40                 :            :  *
      41                 :            :  * Basic RSS route check analysis results.
      42                 :            :  */
      43                 :            : struct RssRouteCheckResultAnalysis
      44                 :            : {
      45                 :            :   /*!
      46                 :            :    * \brief Smart pointer on RssRouteCheckResultAnalysis
      47                 :            :    */
      48                 :            :   typedef std::shared_ptr<RssRouteCheckResultAnalysis> Ptr;
      49                 :            : 
      50                 :            :   /*!
      51                 :            :    * \brief Smart pointer on constant RssRouteCheckResultAnalysis
      52                 :            :    */
      53                 :            :   typedef std::shared_ptr<RssRouteCheckResultAnalysis const> ConstPtr;
      54                 :            : 
      55                 :            :   /*!
      56                 :            :    * \brief standard constructor
      57                 :            :    */
      58                 :         92 :   RssRouteCheckResultAnalysis() = default;
      59                 :            : 
      60                 :            :   /*!
      61                 :            :    * \brief standard destructor
      62                 :            :    */
      63                 :            :   ~RssRouteCheckResultAnalysis() = default;
      64                 :            : 
      65                 :            :   /*!
      66                 :            :    * \brief standard copy constructor
      67                 :            :    */
      68                 :            :   RssRouteCheckResultAnalysis(const RssRouteCheckResultAnalysis &other) = default;
      69                 :            : 
      70                 :            :   /*!
      71                 :            :    * \brief standard move constructor
      72                 :            :    */
      73                 :            :   RssRouteCheckResultAnalysis(RssRouteCheckResultAnalysis &&other) = default;
      74                 :            : 
      75                 :            :   /**
      76                 :            :    * \brief standard assignment operator
      77                 :            :    *
      78                 :            :    * \param[in] other Other RssRouteCheckResultAnalysis
      79                 :            :    *
      80                 :            :    * \returns Reference to this RssRouteCheckResultAnalysis.
      81                 :            :    */
      82                 :            :   RssRouteCheckResultAnalysis &operator=(const RssRouteCheckResultAnalysis &other) = default;
      83                 :            : 
      84                 :            :   /**
      85                 :            :    * \brief standard move operator
      86                 :            :    *
      87                 :            :    * \param[in] other Other RssRouteCheckResultAnalysis
      88                 :            :    *
      89                 :            :    * \returns Reference to this RssRouteCheckResultAnalysis.
      90                 :            :    */
      91                 :            :   RssRouteCheckResultAnalysis &operator=(RssRouteCheckResultAnalysis &&other) = default;
      92                 :            : 
      93                 :            :   /**
      94                 :            :    * \brief standard comparison operator
      95                 :            :    *
      96                 :            :    * \param[in] other Other RssRouteCheckResultAnalysis
      97                 :            :    *
      98                 :            :    * \returns \c true if both RssRouteCheckResultAnalysis are equal
      99                 :            :    */
     100                 :         28 :   bool operator==(const RssRouteCheckResultAnalysis &other) const
     101                 :            :   {
     102         [ +  + ]:         24 :     return (dangerous_state == other.dangerous_state) && (dangerous_vehicle == other.dangerous_vehicle)
     103         [ +  + ]:         22 :       && (dangerous_opposite_state == other.dangerous_opposite_state)
     104   [ +  +  +  + ]:         52 :       && (vehicle_crossing_road_boundaries == other.vehicle_crossing_road_boundaries);
     105                 :            :   }
     106                 :            : 
     107                 :            :   /**
     108                 :            :    * \brief standard comparison operator
     109                 :            :    *
     110                 :            :    * \param[in] other Other RssRouteCheckResultAnalysis.
     111                 :            :    *
     112                 :            :    * \returns \c true if both RssRouteCheckResultAnalysis are different
     113                 :            :    */
     114                 :          5 :   bool operator!=(const RssRouteCheckResultAnalysis &other) const
     115                 :            :   {
     116                 :          5 :     return !operator==(other);
     117                 :            :   }
     118                 :            : 
     119                 :            :   /*!
     120                 :            :    * Flag indicating if the current state is overall dangerous.
     121                 :            :    */
     122                 :            :   bool dangerous_state{true};
     123                 :            : 
     124                 :            :   /*!
     125                 :            :    * Flag indicating if the current state is dangerous because of a vehicle.
     126                 :            :    */
     127                 :            :   bool dangerous_vehicle{true};
     128                 :            : 
     129                 :            :   /*!
     130                 :            :    * Flag indicating if the current state is dangerous because of a vehicle in opposite constellation.
     131                 :            :    */
     132                 :            :   bool dangerous_opposite_state{true};
     133                 :            : 
     134                 :            :   /*!
     135                 :            :    * Flag indicating if the vehicle is already touching/crossing one of the road boundaries.
     136                 :            :    * This is only evaluated if the road boundaries checks are active.
     137                 :            :    * It is a hint to oversteer a bit on countersteering to get back into the road area
     138                 :            :    * again.
     139                 :            :    */
     140                 :            :   bool vehicle_crossing_road_boundaries{false};
     141                 :            : };
     142                 :            : 
     143                 :            : } // namespace map
     144                 :            : } // namespace rss
     145                 :            : } // namespace ad
     146                 :            : 
     147                 :            : /*!
     148                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     149                 :            :  */
     150                 :            : #ifndef GEN_GUARD_AD_RSS_MAP_RSSROUTECHECKRESULTANALYSIS
     151                 :            : #define GEN_GUARD_AD_RSS_MAP_RSSROUTECHECKRESULTANALYSIS
     152                 :            : /*!
     153                 :            :  * @brief namespace ad
     154                 :            :  */
     155                 :            : namespace ad {
     156                 :            : /*!
     157                 :            :  * @brief namespace rss
     158                 :            :  */
     159                 :            : namespace rss {
     160                 :            : /*!
     161                 :            :  * @brief namespace map
     162                 :            :  */
     163                 :            : namespace map {
     164                 :            : 
     165                 :            : /**
     166                 :            :  * \brief standard ostream operator
     167                 :            :  *
     168                 :            :  * \param[in] os The output stream to write to
     169                 :            :  * \param[in] _value RssRouteCheckResultAnalysis value
     170                 :            :  *
     171                 :            :  * \returns The stream object.
     172                 :            :  *
     173                 :            :  */
     174                 :         21 : inline std::ostream &operator<<(std::ostream &os, RssRouteCheckResultAnalysis const &_value)
     175                 :            : {
     176                 :         21 :   os << "RssRouteCheckResultAnalysis(";
     177                 :         21 :   os << "dangerous_state:";
     178                 :         21 :   os << _value.dangerous_state;
     179                 :         21 :   os << ",";
     180                 :         21 :   os << "dangerous_vehicle:";
     181                 :         21 :   os << _value.dangerous_vehicle;
     182                 :         21 :   os << ",";
     183                 :         21 :   os << "dangerous_opposite_state:";
     184                 :         21 :   os << _value.dangerous_opposite_state;
     185                 :         21 :   os << ",";
     186                 :         21 :   os << "vehicle_crossing_road_boundaries:";
     187                 :         21 :   os << _value.vehicle_crossing_road_boundaries;
     188                 :         21 :   os << ")";
     189                 :         21 :   return os;
     190                 :            : }
     191                 :            : 
     192                 :            : } // namespace map
     193                 :            : } // namespace rss
     194                 :            : } // namespace ad
     195                 :            : 
     196                 :            : namespace std {
     197                 :            : /*!
     198                 :            :  * \brief overload of the std::to_string for RssRouteCheckResultAnalysis
     199                 :            :  */
     200                 :          1 : inline std::string to_string(::ad::rss::map::RssRouteCheckResultAnalysis const &value)
     201                 :            : {
     202         [ +  - ]:          1 :   stringstream sstream;
     203         [ +  - ]:          1 :   sstream << value;
     204         [ +  - ]:          2 :   return sstream.str();
     205                 :          1 : }
     206                 :            : } // namespace std
     207                 :            : 
     208                 :            : /*!
     209                 :            :  * \brief overload of fmt::formatter calling std::to_string
     210                 :            :  */
     211                 :            : template <> struct fmt::formatter<::ad::rss::map::RssRouteCheckResultAnalysis> : formatter<string_view>
     212                 :            : {
     213                 :            :   template <typename FormatContext>
     214                 :            :   auto format(::ad::rss::map::RssRouteCheckResultAnalysis const &value, FormatContext &ctx)
     215                 :            :   {
     216                 :            :     return formatter<string_view>::format(std::to_string(value), ctx);
     217                 :            :   }
     218                 :            : };
     219                 :            : 
     220                 :            : #endif // GEN_GUARD_AD_RSS_MAP_RSSROUTECHECKRESULTANALYSIS

Generated by: LCOV version 1.14