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

Generated by: LCOV version 1.14