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

Generated by: LCOV version 1.14