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

Generated by: LCOV version 1.14