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

Generated by: LCOV version 1.14