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

Generated by: LCOV version 1.14