LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - OccupiedRegion.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 21 21 100.0 %
Date: 2024-04-30 13:12:49 Functions: 5 5 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/physics/ParametricRange.hpp"
      25                 :            : #include "ad/rss/world/LaneSegmentId.hpp"
      26                 :            : /*!
      27                 :            :  * @brief namespace ad
      28                 :            :  */
      29                 :            : namespace ad {
      30                 :            : /*!
      31                 :            :  * @brief namespace rss
      32                 :            :  */
      33                 :            : namespace rss {
      34                 :            : /*!
      35                 :            :  * @brief namespace world
      36                 :            :  */
      37                 :            : namespace world {
      38                 :            : 
      39                 :            : /*!
      40                 :            :  * \brief DataType OccupiedRegion
      41                 :            :  *
      42                 :            :  * Describes the region that an object covers within a lane segment.
      43                 :            :  * An object on a lane is described by the parametric range it spans in each of the
      44                 :            :  * two lane segment directions.
      45                 :            :  */
      46                 :            : struct OccupiedRegion
      47                 :            : {
      48                 :            :   /*!
      49                 :            :    * \brief Smart pointer on OccupiedRegion
      50                 :            :    */
      51                 :            :   typedef std::shared_ptr<OccupiedRegion> Ptr;
      52                 :            : 
      53                 :            :   /*!
      54                 :            :    * \brief Smart pointer on constant OccupiedRegion
      55                 :            :    */
      56                 :            :   typedef std::shared_ptr<OccupiedRegion const> ConstPtr;
      57                 :            : 
      58                 :            :   /*!
      59                 :            :    * \brief standard constructor
      60                 :            :    */
      61                 :       6001 :   OccupiedRegion() = default;
      62                 :            : 
      63                 :            :   /*!
      64                 :            :    * \brief standard destructor
      65                 :            :    */
      66                 :            :   ~OccupiedRegion() = default;
      67                 :            : 
      68                 :            :   /*!
      69                 :            :    * \brief standard copy constructor
      70                 :            :    */
      71                 :            :   OccupiedRegion(const OccupiedRegion &other) = default;
      72                 :            : 
      73                 :            :   /*!
      74                 :            :    * \brief standard move constructor
      75                 :            :    */
      76                 :            :   OccupiedRegion(OccupiedRegion &&other) = default;
      77                 :            : 
      78                 :            :   /**
      79                 :            :    * \brief standard assignment operator
      80                 :            :    *
      81                 :            :    * \param[in] other Other OccupiedRegion
      82                 :            :    *
      83                 :            :    * \returns Reference to this OccupiedRegion.
      84                 :            :    */
      85                 :            :   OccupiedRegion &operator=(const OccupiedRegion &other) = default;
      86                 :            : 
      87                 :            :   /**
      88                 :            :    * \brief standard move operator
      89                 :            :    *
      90                 :            :    * \param[in] other Other OccupiedRegion
      91                 :            :    *
      92                 :            :    * \returns Reference to this OccupiedRegion.
      93                 :            :    */
      94                 :            :   OccupiedRegion &operator=(OccupiedRegion &&other) = default;
      95                 :            : 
      96                 :            :   /**
      97                 :            :    * \brief standard comparison operator
      98                 :            :    *
      99                 :            :    * \param[in] other Other OccupiedRegion
     100                 :            :    *
     101                 :            :    * \returns \c true if both OccupiedRegion are equal
     102                 :            :    */
     103                 :         64 :   bool operator==(const OccupiedRegion &other) const
     104                 :            :   {
     105   [ +  +  +  +  :         64 :     return (segmentId == other.segmentId) && (lonRange == other.lonRange) && (latRange == other.latRange);
                   +  + ]
     106                 :            :   }
     107                 :            : 
     108                 :            :   /**
     109                 :            :    * \brief standard comparison operator
     110                 :            :    *
     111                 :            :    * \param[in] other Other OccupiedRegion.
     112                 :            :    *
     113                 :            :    * \returns \c true if both OccupiedRegion are different
     114                 :            :    */
     115                 :          4 :   bool operator!=(const OccupiedRegion &other) const
     116                 :            :   {
     117                 :          4 :     return !operator==(other);
     118                 :            :   }
     119                 :            : 
     120                 :            :   /*!
     121                 :            :    * The id of the lane segment this region refers to.
     122                 :            :    */
     123                 :            :   ::ad::rss::world::LaneSegmentId segmentId;
     124                 :            : 
     125                 :            :   /*!
     126                 :            :    * The parametric range an object spans in longitudinal direction within a lane segment.
     127                 :            :    */
     128                 :            :   ::ad::physics::ParametricRange lonRange;
     129                 :            : 
     130                 :            :   /*!
     131                 :            :    * The parametric range an object spans in lateral direction within a lane segment.
     132                 :            :    */
     133                 :            :   ::ad::physics::ParametricRange latRange;
     134                 :            : };
     135                 :            : 
     136                 :            : } // namespace world
     137                 :            : } // namespace rss
     138                 :            : } // namespace ad
     139                 :            : 
     140                 :            : /*!
     141                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     142                 :            :  */
     143                 :            : #ifndef GEN_GUARD_AD_RSS_WORLD_OCCUPIEDREGION
     144                 :            : #define GEN_GUARD_AD_RSS_WORLD_OCCUPIEDREGION
     145                 :            : /*!
     146                 :            :  * @brief namespace ad
     147                 :            :  */
     148                 :            : namespace ad {
     149                 :            : /*!
     150                 :            :  * @brief namespace rss
     151                 :            :  */
     152                 :            : namespace rss {
     153                 :            : /*!
     154                 :            :  * @brief namespace world
     155                 :            :  */
     156                 :            : namespace world {
     157                 :            : 
     158                 :            : /**
     159                 :            :  * \brief standard ostream operator
     160                 :            :  *
     161                 :            :  * \param[in] os The output stream to write to
     162                 :            :  * \param[in] _value OccupiedRegion value
     163                 :            :  *
     164                 :            :  * \returns The stream object.
     165                 :            :  *
     166                 :            :  */
     167                 :    1004230 : inline std::ostream &operator<<(std::ostream &os, OccupiedRegion const &_value)
     168                 :            : {
     169                 :    1004230 :   os << "OccupiedRegion(";
     170                 :    1004230 :   os << "segmentId:";
     171                 :    1004230 :   os << _value.segmentId;
     172                 :    1004230 :   os << ",";
     173                 :    1004230 :   os << "lonRange:";
     174                 :    1004230 :   os << _value.lonRange;
     175                 :    1004230 :   os << ",";
     176                 :    1004230 :   os << "latRange:";
     177                 :    1004230 :   os << _value.latRange;
     178                 :    1004230 :   os << ")";
     179                 :    1004230 :   return os;
     180                 :            : }
     181                 :            : 
     182                 :            : } // namespace world
     183                 :            : } // namespace rss
     184                 :            : } // namespace ad
     185                 :            : 
     186                 :            : namespace std {
     187                 :            : /*!
     188                 :            :  * \brief overload of the std::to_string for OccupiedRegion
     189                 :            :  */
     190                 :          1 : inline std::string to_string(::ad::rss::world::OccupiedRegion const &value)
     191                 :            : {
     192         [ +  - ]:          2 :   stringstream sstream;
     193         [ +  - ]:          1 :   sstream << value;
     194         [ +  - ]:          2 :   return sstream.str();
     195                 :            : }
     196                 :            : } // namespace std
     197                 :            : #endif // GEN_GUARD_AD_RSS_WORLD_OCCUPIEDREGION

Generated by: LCOV version 1.14