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

Generated by: LCOV version 1.14