LCOV - code coverage report
Current view: top level - generated/include/ad/rss/core - RssSituationSnapshot.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 29 31 93.5 %
Date: 2025-07-22 06:53:46 Functions: 10 11 90.9 %
Branches: 9 12 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 <limits>
      22                 :            : #include <memory>
      23                 :            : #include <sstream>
      24                 :            : #include "ad/rss/core/RelativeConstellationVector.hpp"
      25                 :            : #include "ad/rss/world/RssDynamics.hpp"
      26                 :            : #include "ad/rss/world/TimeIndex.hpp"
      27                 :            : /*!
      28                 :            :  * @brief namespace ad
      29                 :            :  */
      30                 :            : namespace ad {
      31                 :            : /*!
      32                 :            :  * @brief namespace rss
      33                 :            :  */
      34                 :            : namespace rss {
      35                 :            : /*!
      36                 :            :  * @brief namespace core
      37                 :            :  */
      38                 :            : namespace core {
      39                 :            : 
      40                 :            : /*!
      41                 :            :  * \brief DataType RssSituationSnapshot
      42                 :            :  *
      43                 :            :  * A snapshot in time of the current relative constellations within their constellation specific lane coordinate system.
      44                 :            :  */
      45                 :            : struct RssSituationSnapshot
      46                 :            : {
      47                 :            :   /*!
      48                 :            :    * \brief Smart pointer on RssSituationSnapshot
      49                 :            :    */
      50                 :            :   typedef std::shared_ptr<RssSituationSnapshot> Ptr;
      51                 :            : 
      52                 :            :   /*!
      53                 :            :    * \brief Smart pointer on constant RssSituationSnapshot
      54                 :            :    */
      55                 :            :   typedef std::shared_ptr<RssSituationSnapshot const> ConstPtr;
      56                 :            : 
      57                 :            :   /*!
      58                 :            :    * \brief standard constructor
      59                 :            :    */
      60                 :       4403 :   RssSituationSnapshot() = default;
      61                 :            : 
      62                 :            :   /*!
      63                 :            :    * \brief standard destructor
      64                 :            :    */
      65                 :       4415 :   ~RssSituationSnapshot() = default;
      66                 :            : 
      67                 :            :   /*!
      68                 :            :    * \brief standard copy constructor
      69                 :            :    */
      70                 :         11 :   RssSituationSnapshot(const RssSituationSnapshot &other) = default;
      71                 :            : 
      72                 :            :   /*!
      73                 :            :    * \brief standard move constructor
      74                 :            :    */
      75                 :          1 :   RssSituationSnapshot(RssSituationSnapshot &&other) = default;
      76                 :            : 
      77                 :            :   /**
      78                 :            :    * \brief standard assignment operator
      79                 :            :    *
      80                 :            :    * \param[in] other Other RssSituationSnapshot
      81                 :            :    *
      82                 :            :    * \returns Reference to this RssSituationSnapshot.
      83                 :            :    */
      84                 :         10 :   RssSituationSnapshot &operator=(const RssSituationSnapshot &other) = default;
      85                 :            : 
      86                 :            :   /**
      87                 :            :    * \brief standard move operator
      88                 :            :    *
      89                 :            :    * \param[in] other Other RssSituationSnapshot
      90                 :            :    *
      91                 :            :    * \returns Reference to this RssSituationSnapshot.
      92                 :            :    */
      93                 :          1 :   RssSituationSnapshot &operator=(RssSituationSnapshot &&other) = default;
      94                 :            : 
      95                 :            :   /**
      96                 :            :    * \brief standard comparison operator
      97                 :            :    *
      98                 :            :    * \param[in] other Other RssSituationSnapshot
      99                 :            :    *
     100                 :            :    * \returns \c true if both RssSituationSnapshot are equal
     101                 :            :    */
     102                 :         12 :   bool operator==(const RssSituationSnapshot &other) const
     103                 :            :   {
     104                 :         12 :     return (time_index == other.time_index)
     105         [ +  + ]:         10 :       && (default_ego_vehicle_rss_dynamics == other.default_ego_vehicle_rss_dynamics)
     106   [ +  +  +  + ]:         22 :       && (constellations == other.constellations);
     107                 :            :   }
     108                 :            : 
     109                 :            :   /**
     110                 :            :    * \brief standard comparison operator
     111                 :            :    *
     112                 :            :    * \param[in] other Other RssSituationSnapshot.
     113                 :            :    *
     114                 :            :    * \returns \c true if both RssSituationSnapshot are different
     115                 :            :    */
     116                 :          4 :   bool operator!=(const RssSituationSnapshot &other) const
     117                 :            :   {
     118                 :          4 :     return !operator==(other);
     119                 :            :   }
     120                 :            : 
     121                 :            :   /*!
     122                 :            :    * The time index is required to distinguish different points in time when tracking states or transforming responses
     123                 :            :    * back.
     124                 :            :    */
     125                 :            :   ::ad::rss::world::TimeIndex time_index{0u};
     126                 :            : 
     127                 :            :   /*!
     128                 :            :    * Defines the standard ego vehicle dynamics to be applied i.e. when there is no  dangerous
     129                 :            :    * constellation.
     130                 :            :    * This parameters are provided in addtion on a per constellation basis to be able
     131                 :            :    * to adapt these e.g. in respect to object type or the weather conditions
     132                 :            :    */
     133                 :            :   ::ad::rss::world::RssDynamics default_ego_vehicle_rss_dynamics;
     134                 :            : 
     135                 :            :   /*!
     136                 :            :    * The vector of constellations at a given time within their constellation specific lane coordinate system.
     137                 :            :    */
     138                 :            :   ::ad::rss::core::RelativeConstellationVector constellations;
     139                 :            : };
     140                 :            : 
     141                 :            : } // namespace core
     142                 :            : } // namespace rss
     143                 :            : } // namespace ad
     144                 :            : 
     145                 :            : /*!
     146                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     147                 :            :  */
     148                 :            : #ifndef GEN_GUARD_AD_RSS_CORE_RSSSITUATIONSNAPSHOT
     149                 :            : #define GEN_GUARD_AD_RSS_CORE_RSSSITUATIONSNAPSHOT
     150                 :            : /*!
     151                 :            :  * @brief namespace ad
     152                 :            :  */
     153                 :            : namespace ad {
     154                 :            : /*!
     155                 :            :  * @brief namespace rss
     156                 :            :  */
     157                 :            : namespace rss {
     158                 :            : /*!
     159                 :            :  * @brief namespace core
     160                 :            :  */
     161                 :            : namespace core {
     162                 :            : 
     163                 :            : /**
     164                 :            :  * \brief standard ostream operator
     165                 :            :  *
     166                 :            :  * \param[in] os The output stream to write to
     167                 :            :  * \param[in] _value RssSituationSnapshot value
     168                 :            :  *
     169                 :            :  * \returns The stream object.
     170                 :            :  *
     171                 :            :  */
     172                 :          2 : inline std::ostream &operator<<(std::ostream &os, RssSituationSnapshot const &_value)
     173                 :            : {
     174                 :          2 :   os << "RssSituationSnapshot(";
     175                 :          2 :   os << "time_index:";
     176                 :          2 :   os << _value.time_index;
     177                 :          2 :   os << ",";
     178                 :          2 :   os << "default_ego_vehicle_rss_dynamics:";
     179                 :          2 :   os << _value.default_ego_vehicle_rss_dynamics;
     180                 :          2 :   os << ",";
     181                 :          2 :   os << "constellations:";
     182                 :          2 :   os << _value.constellations;
     183                 :          2 :   os << ")";
     184                 :          2 :   return os;
     185                 :            : }
     186                 :            : 
     187                 :            : } // namespace core
     188                 :            : } // namespace rss
     189                 :            : } // namespace ad
     190                 :            : 
     191                 :            : namespace std {
     192                 :            : /*!
     193                 :            :  * \brief overload of the std::to_string for RssSituationSnapshot
     194                 :            :  */
     195                 :          1 : inline std::string to_string(::ad::rss::core::RssSituationSnapshot const &value)
     196                 :            : {
     197         [ +  - ]:          1 :   stringstream sstream;
     198         [ +  - ]:          1 :   sstream << value;
     199         [ +  - ]:          2 :   return sstream.str();
     200                 :          1 : }
     201                 :            : } // namespace std
     202                 :            : 
     203                 :            : /*!
     204                 :            :  * \brief overload of fmt::formatter calling std::to_string
     205                 :            :  */
     206                 :            : template <> struct fmt::formatter<::ad::rss::core::RssSituationSnapshot> : formatter<string_view>
     207                 :            : {
     208                 :          0 :   template <typename FormatContext> auto format(::ad::rss::core::RssSituationSnapshot const &value, FormatContext &ctx)
     209                 :            :   {
     210                 :          0 :     return formatter<string_view>::format(std::to_string(value), ctx);
     211                 :            :   }
     212                 :            : };
     213                 :            : 
     214                 :            : #endif // GEN_GUARD_AD_RSS_CORE_RSSSITUATIONSNAPSHOT

Generated by: LCOV version 1.14