LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - ObjectState.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 31 31 100.0 %
Date: 2024-05-02 09:41:50 Functions: 5 5 100.0 %
Branches: 15 18 83.3 %

           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/physics/Angle.hpp"
      25                 :            : #include "ad/physics/AngularVelocity.hpp"
      26                 :            : #include "ad/physics/Dimension2D.hpp"
      27                 :            : #include "ad/physics/Distance2D.hpp"
      28                 :            : #include "ad/physics/Speed.hpp"
      29                 :            : /*!
      30                 :            :  * @brief namespace ad
      31                 :            :  */
      32                 :            : namespace ad {
      33                 :            : /*!
      34                 :            :  * @brief namespace rss
      35                 :            :  */
      36                 :            : namespace rss {
      37                 :            : /*!
      38                 :            :  * @brief namespace world
      39                 :            :  */
      40                 :            : namespace world {
      41                 :            : 
      42                 :            : /*!
      43                 :            :  * \brief DataType ObjectState
      44                 :            :  *
      45                 :            :  * State of an object in the reference coordinate system (e.g. ENU).
      46                 :            :  * As the evaluation results of multiple scenes have to be merged, this reference system
      47                 :            :  * has to be the same for all entries at a specific time.
      48                 :            :  * The proper response, i.e. the headingRanges of the unstructured scene response,
      49                 :            :  * refers to this reference coodinate system.
      50                 :            :  */
      51                 :            : struct ObjectState
      52                 :            : {
      53                 :            :   /*!
      54                 :            :    * \brief Smart pointer on ObjectState
      55                 :            :    */
      56                 :            :   typedef std::shared_ptr<ObjectState> Ptr;
      57                 :            : 
      58                 :            :   /*!
      59                 :            :    * \brief Smart pointer on constant ObjectState
      60                 :            :    */
      61                 :            :   typedef std::shared_ptr<ObjectState const> ConstPtr;
      62                 :            : 
      63                 :            :   /*!
      64                 :            :    * \brief standard constructor
      65                 :            :    */
      66                 :      30776 :   ObjectState() = default;
      67                 :            : 
      68                 :            :   /*!
      69                 :            :    * \brief standard destructor
      70                 :            :    */
      71                 :            :   ~ObjectState() = default;
      72                 :            : 
      73                 :            :   /*!
      74                 :            :    * \brief standard copy constructor
      75                 :            :    */
      76                 :            :   ObjectState(const ObjectState &other) = default;
      77                 :            : 
      78                 :            :   /*!
      79                 :            :    * \brief standard move constructor
      80                 :            :    */
      81                 :            :   ObjectState(ObjectState &&other) = default;
      82                 :            : 
      83                 :            :   /**
      84                 :            :    * \brief standard assignment operator
      85                 :            :    *
      86                 :            :    * \param[in] other Other ObjectState
      87                 :            :    *
      88                 :            :    * \returns Reference to this ObjectState.
      89                 :            :    */
      90                 :            :   ObjectState &operator=(const ObjectState &other) = default;
      91                 :            : 
      92                 :            :   /**
      93                 :            :    * \brief standard move operator
      94                 :            :    *
      95                 :            :    * \param[in] other Other ObjectState
      96                 :            :    *
      97                 :            :    * \returns Reference to this ObjectState.
      98                 :            :    */
      99                 :            :   ObjectState &operator=(ObjectState &&other) = default;
     100                 :            : 
     101                 :            :   /**
     102                 :            :    * \brief standard comparison operator
     103                 :            :    *
     104                 :            :    * \param[in] other Other ObjectState
     105                 :            :    *
     106                 :            :    * \returns \c true if both ObjectState are equal
     107                 :            :    */
     108                 :        104 :   bool operator==(const ObjectState &other) const
     109                 :            :   {
     110   [ +  +  +  + ]:        202 :     return (yaw == other.yaw) && (dimension == other.dimension) && (yawRate == other.yawRate)
     111   [ +  +  +  +  :        202 :       && (centerPoint == other.centerPoint) && (speed == other.speed) && (steeringAngle == other.steeringAngle);
             +  +  +  + ]
     112                 :            :   }
     113                 :            : 
     114                 :            :   /**
     115                 :            :    * \brief standard comparison operator
     116                 :            :    *
     117                 :            :    * \param[in] other Other ObjectState.
     118                 :            :    *
     119                 :            :    * \returns \c true if both ObjectState are different
     120                 :            :    */
     121                 :          7 :   bool operator!=(const ObjectState &other) const
     122                 :            :   {
     123                 :          7 :     return !operator==(other);
     124                 :            :   }
     125                 :            : 
     126                 :            :   /*!
     127                 :            :    * The heading angle of the object in the reference coordinate system (e.g. ENU).
     128                 :            :    */
     129                 :            :   ::ad::physics::Angle yaw;
     130                 :            : 
     131                 :            :   /*!
     132                 :            :    * The dimension of the object in the reference coordinate system (e.g. ENU).
     133                 :            :    */
     134                 :            :   ::ad::physics::Dimension2D dimension;
     135                 :            : 
     136                 :            :   /*!
     137                 :            :    * The angular velocity of the object in the reference coordinate system (e.g. ENU).
     138                 :            :    */
     139                 :            :   ::ad::physics::AngularVelocity yawRate;
     140                 :            : 
     141                 :            :   /*!
     142                 :            :    * The center point of the object in the reference coordinate system (e.g. ENU).
     143                 :            :    */
     144                 :            :   ::ad::physics::Distance2D centerPoint;
     145                 :            : 
     146                 :            :   /*!
     147                 :            :    * The speed of the object in the reference coordinate system (e.g. ENU).
     148                 :            :    */
     149                 :            :   ::ad::physics::Speed speed;
     150                 :            : 
     151                 :            :   /*!
     152                 :            :    * The steering angle of the object in the object frame.
     153                 :            :    */
     154                 :            :   ::ad::physics::Angle steeringAngle;
     155                 :            : };
     156                 :            : 
     157                 :            : } // namespace world
     158                 :            : } // namespace rss
     159                 :            : } // namespace ad
     160                 :            : 
     161                 :            : /*!
     162                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     163                 :            :  */
     164                 :            : #ifndef GEN_GUARD_AD_RSS_WORLD_OBJECTSTATE
     165                 :            : #define GEN_GUARD_AD_RSS_WORLD_OBJECTSTATE
     166                 :            : /*!
     167                 :            :  * @brief namespace ad
     168                 :            :  */
     169                 :            : namespace ad {
     170                 :            : /*!
     171                 :            :  * @brief namespace rss
     172                 :            :  */
     173                 :            : namespace rss {
     174                 :            : /*!
     175                 :            :  * @brief namespace world
     176                 :            :  */
     177                 :            : namespace world {
     178                 :            : 
     179                 :            : /**
     180                 :            :  * \brief standard ostream operator
     181                 :            :  *
     182                 :            :  * \param[in] os The output stream to write to
     183                 :            :  * \param[in] _value ObjectState value
     184                 :            :  *
     185                 :            :  * \returns The stream object.
     186                 :            :  *
     187                 :            :  */
     188                 :    4023430 : inline std::ostream &operator<<(std::ostream &os, ObjectState const &_value)
     189                 :            : {
     190                 :    4023430 :   os << "ObjectState(";
     191                 :    4023430 :   os << "yaw:";
     192                 :    4023430 :   os << _value.yaw;
     193                 :    4023430 :   os << ",";
     194                 :    4023430 :   os << "dimension:";
     195                 :    4023430 :   os << _value.dimension;
     196                 :    4023430 :   os << ",";
     197                 :    4023430 :   os << "yawRate:";
     198                 :    4023430 :   os << _value.yawRate;
     199                 :    4023430 :   os << ",";
     200                 :    4023430 :   os << "centerPoint:";
     201                 :    4023430 :   os << _value.centerPoint;
     202                 :    4023430 :   os << ",";
     203                 :    4023430 :   os << "speed:";
     204                 :    4023430 :   os << _value.speed;
     205                 :    4023430 :   os << ",";
     206                 :    4023430 :   os << "steeringAngle:";
     207                 :    4023430 :   os << _value.steeringAngle;
     208                 :    4023430 :   os << ")";
     209                 :    4023430 :   return os;
     210                 :            : }
     211                 :            : 
     212                 :            : } // namespace world
     213                 :            : } // namespace rss
     214                 :            : } // namespace ad
     215                 :            : 
     216                 :            : namespace std {
     217                 :            : /*!
     218                 :            :  * \brief overload of the std::to_string for ObjectState
     219                 :            :  */
     220                 :          1 : inline std::string to_string(::ad::rss::world::ObjectState const &value)
     221                 :            : {
     222         [ +  - ]:          2 :   stringstream sstream;
     223         [ +  - ]:          1 :   sstream << value;
     224         [ +  - ]:          2 :   return sstream.str();
     225                 :            : }
     226                 :            : } // namespace std
     227                 :            : #endif // GEN_GUARD_AD_RSS_WORLD_OBJECTSTATE

Generated by: LCOV version 1.14