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

Generated by: LCOV version 1.14