LCOV - code coverage report
Current view: top level - generated/include/ad/map/match - MapMatchedObjectBoundingBox.hpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 30 30 100.0 %
Date: 2022-10-04 09:48:07 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: MIT
       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/map/match/LaneOccupiedRegionList.hpp"
      25                 :            : #include "ad/map/match/MapMatchedObjectReferencePositionList.hpp"
      26                 :            : #include "ad/physics/Distance.hpp"
      27                 :            : /*!
      28                 :            :  * @brief namespace ad
      29                 :            :  */
      30                 :            : namespace ad {
      31                 :            : /*!
      32                 :            :  * @brief namespace map
      33                 :            :  */
      34                 :            : namespace map {
      35                 :            : /*!
      36                 :            :  * @brief namespace match
      37                 :            :  *
      38                 :            :  * Map matching
      39                 :            :  */
      40                 :            : namespace match {
      41                 :            : 
      42                 :            : /*!
      43                 :            :  * \brief DataType MapMatchedObjectBoundingBox
      44                 :            :  */
      45                 :         58 : struct MapMatchedObjectBoundingBox
      46                 :            : {
      47                 :            :   /*!
      48                 :            :    * \brief Smart pointer on MapMatchedObjectBoundingBox
      49                 :            :    */
      50                 :            :   typedef std::shared_ptr<MapMatchedObjectBoundingBox> Ptr;
      51                 :            : 
      52                 :            :   /*!
      53                 :            :    * \brief Smart pointer on constant MapMatchedObjectBoundingBox
      54                 :            :    */
      55                 :            :   typedef std::shared_ptr<MapMatchedObjectBoundingBox const> ConstPtr;
      56                 :            : 
      57                 :            :   /*!
      58                 :            :    * \brief standard constructor
      59                 :            :    */
      60                 :        102 :   MapMatchedObjectBoundingBox() = default;
      61                 :            : 
      62                 :            :   /*!
      63                 :            :    * \brief standard destructor
      64                 :            :    */
      65                 :        127 :   ~MapMatchedObjectBoundingBox() = default;
      66                 :            : 
      67                 :            :   /*!
      68                 :            :    * \brief standard copy constructor
      69                 :            :    */
      70         [ +  - ]:         23 :   MapMatchedObjectBoundingBox(const MapMatchedObjectBoundingBox &other) = default;
      71                 :            : 
      72                 :            :   /*!
      73                 :            :    * \brief standard move constructor
      74                 :            :    */
      75                 :          2 :   MapMatchedObjectBoundingBox(MapMatchedObjectBoundingBox &&other) = default;
      76                 :            : 
      77                 :            :   /**
      78                 :            :    * \brief standard assignment operator
      79                 :            :    *
      80                 :            :    * \param[in] other Other MapMatchedObjectBoundingBox
      81                 :            :    *
      82                 :            :    * \returns Reference to this MapMatchedObjectBoundingBox.
      83                 :            :    */
      84                 :            :   MapMatchedObjectBoundingBox &operator=(const MapMatchedObjectBoundingBox &other) = default;
      85                 :            : 
      86                 :            :   /**
      87                 :            :    * \brief standard move operator
      88                 :            :    *
      89                 :            :    * \param[in] other Other MapMatchedObjectBoundingBox
      90                 :            :    *
      91                 :            :    * \returns Reference to this MapMatchedObjectBoundingBox.
      92                 :            :    */
      93                 :            :   MapMatchedObjectBoundingBox &operator=(MapMatchedObjectBoundingBox &&other) = default;
      94                 :            : 
      95                 :            :   /**
      96                 :            :    * \brief standard comparison operator
      97                 :            :    *
      98                 :            :    * \param[in] other Other MapMatchedObjectBoundingBox
      99                 :            :    *
     100                 :            :    * \returns \c true if both MapMatchedObjectBoundingBox are equal
     101                 :            :    */
     102                 :         22 :   bool operator==(const MapMatchedObjectBoundingBox &other) const
     103                 :            :   {
     104                 :         22 :     return (laneOccupiedRegions == other.laneOccupiedRegions)
     105   [ +  +  +  + ]:         18 :       && (referencePointPositions == other.referencePointPositions) && (samplingDistance == other.samplingDistance)
     106   [ +  +  +  + ]:         40 :       && (matchRadius == other.matchRadius);
     107                 :            :   }
     108                 :            : 
     109                 :            :   /**
     110                 :            :    * \brief standard comparison operator
     111                 :            :    *
     112                 :            :    * \param[in] other Other MapMatchedObjectBoundingBox.
     113                 :            :    *
     114                 :            :    * \returns \c true if both MapMatchedObjectBoundingBox are different
     115                 :            :    */
     116                 :          5 :   bool operator!=(const MapMatchedObjectBoundingBox &other) const
     117                 :            :   {
     118                 :          5 :     return !operator==(other);
     119                 :            :   }
     120                 :            : 
     121                 :            :   ::ad::map::match::LaneOccupiedRegionList laneOccupiedRegions;
     122                 :            :   ::ad::map::match::MapMatchedObjectReferencePositionList referencePointPositions;
     123                 :            : 
     124                 :            :   /*!
     125                 :            :    * Sampling distance used to calculate the bounding box.
     126                 :            :    */
     127                 :            :   ::ad::physics::Distance samplingDistance{0.0};
     128                 :            : 
     129                 :            :   /*!
     130                 :            :    * The actual map matching radius around the object.
     131                 :            :    */
     132                 :            :   ::ad::physics::Distance matchRadius{0.0};
     133                 :            : };
     134                 :            : 
     135                 :            : } // namespace match
     136                 :            : } // namespace map
     137                 :            : } // namespace ad
     138                 :            : 
     139                 :            : /*!
     140                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     141                 :            :  */
     142                 :            : #ifndef GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDOBJECTBOUNDINGBOX
     143                 :            : #define GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDOBJECTBOUNDINGBOX
     144                 :            : /*!
     145                 :            :  * @brief namespace ad
     146                 :            :  */
     147                 :            : namespace ad {
     148                 :            : /*!
     149                 :            :  * @brief namespace map
     150                 :            :  */
     151                 :            : namespace map {
     152                 :            : /*!
     153                 :            :  * @brief namespace match
     154                 :            :  *
     155                 :            :  * Map matching
     156                 :            :  */
     157                 :            : namespace match {
     158                 :            : 
     159                 :            : /**
     160                 :            :  * \brief standard ostream operator
     161                 :            :  *
     162                 :            :  * \param[in] os The output stream to write to
     163                 :            :  * \param[in] _value MapMatchedObjectBoundingBox value
     164                 :            :  *
     165                 :            :  * \returns The stream object.
     166                 :            :  *
     167                 :            :  */
     168                 :         16 : inline std::ostream &operator<<(std::ostream &os, MapMatchedObjectBoundingBox const &_value)
     169                 :            : {
     170                 :         16 :   os << "MapMatchedObjectBoundingBox(";
     171                 :         16 :   os << "laneOccupiedRegions:";
     172                 :         16 :   os << _value.laneOccupiedRegions;
     173                 :         16 :   os << ",";
     174                 :         16 :   os << "referencePointPositions:";
     175                 :         16 :   os << _value.referencePointPositions;
     176                 :         16 :   os << ",";
     177                 :         16 :   os << "samplingDistance:";
     178                 :         16 :   os << _value.samplingDistance;
     179                 :         16 :   os << ",";
     180                 :         16 :   os << "matchRadius:";
     181                 :         16 :   os << _value.matchRadius;
     182                 :         16 :   os << ")";
     183                 :         16 :   return os;
     184                 :            : }
     185                 :            : 
     186                 :            : } // namespace match
     187                 :            : } // namespace map
     188                 :            : } // namespace ad
     189                 :            : 
     190                 :            : namespace std {
     191                 :            : /*!
     192                 :            :  * \brief overload of the std::to_string for MapMatchedObjectBoundingBox
     193                 :            :  */
     194                 :          1 : inline std::string to_string(::ad::map::match::MapMatchedObjectBoundingBox const &value)
     195                 :            : {
     196         [ +  - ]:          2 :   stringstream sstream;
     197         [ +  - ]:          1 :   sstream << value;
     198         [ +  - ]:          2 :   return sstream.str();
     199                 :            : }
     200                 :            : } // namespace std
     201                 :            : #endif // GEN_GUARD_AD_MAP_MATCH_MAPMATCHEDOBJECTBOUNDINGBOX

Generated by: LCOV version 1.14