LCOV - code coverage report
Current view: top level - generated/include/ad/rss/map - RssRouteCheckResult.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: 21 28 75.0 %

           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 "ad/rss/core/RssSituationSnapshot.hpp"
      24                 :            : #include "ad/rss/map/RssRoute.hpp"
      25                 :            : #include "ad/rss/map/RssRouteCheckResultAnalysis.hpp"
      26                 :            : #include "ad/rss/state/ProperResponse.hpp"
      27                 :            : #include "ad/rss/state/RssStateSnapshot.hpp"
      28                 :            : #include "ad/rss/world/WorldModel.hpp"
      29                 :            : /*!
      30                 :            :  * @brief namespace ad
      31                 :            :  */
      32                 :            : namespace ad {
      33                 :            : /*!
      34                 :            :  * @brief namespace rss
      35                 :            :  */
      36                 :            : namespace rss {
      37                 :            : /*!
      38                 :            :  * @brief namespace map
      39                 :            :  */
      40                 :            : namespace map {
      41                 :            : 
      42                 :            : /*!
      43                 :            :  * \brief DataType RssRouteCheckResult
      44                 :            :  *
      45                 :            :  * Struct collecting the RSS states in respect to a route for a vehicle
      46                 :            :  */
      47                 :            : struct RssRouteCheckResult
      48                 :            : {
      49                 :            :   /*!
      50                 :            :    * \brief Smart pointer on RssRouteCheckResult
      51                 :            :    */
      52                 :            :   typedef std::shared_ptr<RssRouteCheckResult> Ptr;
      53                 :            : 
      54                 :            :   /*!
      55                 :            :    * \brief Smart pointer on constant RssRouteCheckResult
      56                 :            :    */
      57                 :            :   typedef std::shared_ptr<RssRouteCheckResult const> ConstPtr;
      58                 :            : 
      59                 :            :   /*!
      60                 :            :    * \brief standard constructor
      61                 :            :    */
      62                 :         82 :   RssRouteCheckResult() = default;
      63                 :            : 
      64                 :            :   /*!
      65                 :            :    * \brief standard destructor
      66                 :            :    */
      67                 :        218 :   ~RssRouteCheckResult() = default;
      68                 :            : 
      69                 :            :   /*!
      70                 :            :    * \brief standard copy constructor
      71                 :            :    */
      72   [ +  -  +  -  :        124 :   RssRouteCheckResult(const RssRouteCheckResult &other) = default;
             +  -  +  - ]
      73                 :            : 
      74                 :            :   /*!
      75                 :            :    * \brief standard move constructor
      76                 :            :    */
      77                 :         12 :   RssRouteCheckResult(RssRouteCheckResult &&other) = default;
      78                 :            : 
      79                 :            :   /**
      80                 :            :    * \brief standard assignment operator
      81                 :            :    *
      82                 :            :    * \param[in] other Other RssRouteCheckResult
      83                 :            :    *
      84                 :            :    * \returns Reference to this RssRouteCheckResult.
      85                 :            :    */
      86                 :         14 :   RssRouteCheckResult &operator=(const RssRouteCheckResult &other) = default;
      87                 :            : 
      88                 :            :   /**
      89                 :            :    * \brief standard move operator
      90                 :            :    *
      91                 :            :    * \param[in] other Other RssRouteCheckResult
      92                 :            :    *
      93                 :            :    * \returns Reference to this RssRouteCheckResult.
      94                 :            :    */
      95                 :          1 :   RssRouteCheckResult &operator=(RssRouteCheckResult &&other) = default;
      96                 :            : 
      97                 :            :   /**
      98                 :            :    * \brief standard comparison operator
      99                 :            :    *
     100                 :            :    * \param[in] other Other RssRouteCheckResult
     101                 :            :    *
     102                 :            :    * \returns \c true if both RssRouteCheckResult are equal
     103                 :            :    */
     104                 :         26 :   bool operator==(const RssRouteCheckResult &other) const
     105                 :            :   {
     106   [ +  +  +  + ]:         50 :     return (rss_route == other.rss_route) && (is_valid == other.is_valid) && (world_model == other.world_model)
     107   [ +  +  +  + ]:         20 :       && (rss_situation_snapshot == other.rss_situation_snapshot) && (rss_state_snapshot == other.rss_state_snapshot)
     108   [ +  +  +  +  :         50 :       && (proper_response == other.proper_response) && (result_analysis == other.result_analysis);
                   +  + ]
     109                 :            :   }
     110                 :            : 
     111                 :            :   /**
     112                 :            :    * \brief standard comparison operator
     113                 :            :    *
     114                 :            :    * \param[in] other Other RssRouteCheckResult.
     115                 :            :    *
     116                 :            :    * \returns \c true if both RssRouteCheckResult are different
     117                 :            :    */
     118                 :          8 :   bool operator!=(const RssRouteCheckResult &other) const
     119                 :            :   {
     120                 :          8 :     return !operator==(other);
     121                 :            :   }
     122                 :            : 
     123                 :            :   /*!
     124                 :            :    * The route this result belongs to.
     125                 :            :    */
     126                 :            :   ::ad::rss::map::RssRoute rss_route;
     127                 :            : 
     128                 :            :   /*!
     129                 :            :    * Flag indicating if the RssRouteResult is valid.
     130                 :            :    */
     131                 :            :   bool is_valid{false};
     132                 :            : 
     133                 :            :   /*!
     134                 :            :    * The RSS world model as input to the RSS check on the route.
     135                 :            :    */
     136                 :            :   ::ad::rss::world::WorldModel world_model;
     137                 :            : 
     138                 :            :   /*!
     139                 :            :    * The RSS situation snapshot as output of the RSS check on the route.
     140                 :            :    */
     141                 :            :   ::ad::rss::core::RssSituationSnapshot rss_situation_snapshot;
     142                 :            : 
     143                 :            :   /*!
     144                 :            :    * The RSS state snapshot as output of the RSS check on the route.
     145                 :            :    */
     146                 :            :   ::ad::rss::state::RssStateSnapshot rss_state_snapshot;
     147                 :            : 
     148                 :            :   /*!
     149                 :            :    * The RSS proper response as output of the RSS check on the route.
     150                 :            :    */
     151                 :            :   ::ad::rss::state::ProperResponse proper_response;
     152                 :            : 
     153                 :            :   /*!
     154                 :            :    * Basic analysis of the RSS route check results.
     155                 :            :    */
     156                 :            :   ::ad::rss::map::RssRouteCheckResultAnalysis result_analysis;
     157                 :            : };
     158                 :            : 
     159                 :            : } // namespace map
     160                 :            : } // namespace rss
     161                 :            : } // namespace ad
     162                 :            : 
     163                 :            : /*!
     164                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     165                 :            :  */
     166                 :            : #ifndef GEN_GUARD_AD_RSS_MAP_RSSROUTECHECKRESULT
     167                 :            : #define GEN_GUARD_AD_RSS_MAP_RSSROUTECHECKRESULT
     168                 :            : /*!
     169                 :            :  * @brief namespace ad
     170                 :            :  */
     171                 :            : namespace ad {
     172                 :            : /*!
     173                 :            :  * @brief namespace rss
     174                 :            :  */
     175                 :            : namespace rss {
     176                 :            : /*!
     177                 :            :  * @brief namespace map
     178                 :            :  */
     179                 :            : namespace map {
     180                 :            : 
     181                 :            : /**
     182                 :            :  * \brief standard ostream operator
     183                 :            :  *
     184                 :            :  * \param[in] os The output stream to write to
     185                 :            :  * \param[in] _value RssRouteCheckResult value
     186                 :            :  *
     187                 :            :  * \returns The stream object.
     188                 :            :  *
     189                 :            :  */
     190                 :         19 : inline std::ostream &operator<<(std::ostream &os, RssRouteCheckResult const &_value)
     191                 :            : {
     192                 :         19 :   os << "RssRouteCheckResult(";
     193                 :         19 :   os << "rss_route:";
     194                 :         19 :   os << _value.rss_route;
     195                 :         19 :   os << ",";
     196                 :         19 :   os << "is_valid:";
     197                 :         19 :   os << _value.is_valid;
     198                 :         19 :   os << ",";
     199                 :         19 :   os << "world_model:";
     200                 :         19 :   os << _value.world_model;
     201                 :         19 :   os << ",";
     202                 :         19 :   os << "rss_situation_snapshot:";
     203                 :         19 :   os << _value.rss_situation_snapshot;
     204                 :         19 :   os << ",";
     205                 :         19 :   os << "rss_state_snapshot:";
     206                 :         19 :   os << _value.rss_state_snapshot;
     207                 :         19 :   os << ",";
     208                 :         19 :   os << "proper_response:";
     209                 :         19 :   os << _value.proper_response;
     210                 :         19 :   os << ",";
     211                 :         19 :   os << "result_analysis:";
     212                 :         19 :   os << _value.result_analysis;
     213                 :         19 :   os << ")";
     214                 :         19 :   return os;
     215                 :            : }
     216                 :            : 
     217                 :            : } // namespace map
     218                 :            : } // namespace rss
     219                 :            : } // namespace ad
     220                 :            : 
     221                 :            : namespace std {
     222                 :            : /*!
     223                 :            :  * \brief overload of the std::to_string for RssRouteCheckResult
     224                 :            :  */
     225                 :         13 : inline std::string to_string(::ad::rss::map::RssRouteCheckResult const &value)
     226                 :            : {
     227         [ +  - ]:         13 :   stringstream sstream;
     228         [ +  - ]:         13 :   sstream << value;
     229         [ +  - ]:         26 :   return sstream.str();
     230                 :         13 : }
     231                 :            : } // namespace std
     232                 :            : 
     233                 :            : /*!
     234                 :            :  * \brief overload of fmt::formatter calling std::to_string
     235                 :            :  */
     236                 :            : template <> struct fmt::formatter<::ad::rss::map::RssRouteCheckResult> : formatter<string_view>
     237                 :            : {
     238                 :         12 :   template <typename FormatContext> auto format(::ad::rss::map::RssRouteCheckResult const &value, FormatContext &ctx)
     239                 :            :   {
     240                 :         24 :     return formatter<string_view>::format(std::to_string(value), ctx);
     241                 :            :   }
     242                 :            : };
     243                 :            : 
     244                 :            : #endif // GEN_GUARD_AD_RSS_MAP_RSSROUTECHECKRESULT

Generated by: LCOV version 1.14