LCOV - code coverage report
Current view: top level - generated/include/ad/rss/state - RssStateEvaluator.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 2 2 100.0 %
Date: 2024-05-07 10:58:10 Functions: 1 1 100.0 %
Branches: 1 2 50.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 <string>
      23                 :            : /*!
      24                 :            :  * @brief namespace ad
      25                 :            :  */
      26                 :            : namespace ad {
      27                 :            : /*!
      28                 :            :  * @brief namespace rss
      29                 :            :  */
      30                 :            : namespace rss {
      31                 :            : /*!
      32                 :            :  * @brief namespace state
      33                 :            :  */
      34                 :            : namespace state {
      35                 :            : 
      36                 :            : /*!
      37                 :            :  * \brief DataType RssStateEvaluator
      38                 :            :  *
      39                 :            :  * The method used to evaluate the respone.
      40                 :            :  */
      41                 :            : enum class RssStateEvaluator : int32_t
      42                 :            : {
      43                 :            :   /*!
      44                 :            :    * Not evaluated.
      45                 :            :    */
      46                 :            :   None = 0,
      47                 :            : 
      48                 :            :   /*!
      49                 :            :    * longitudinal, opposite direction, correct lane
      50                 :            :    */
      51                 :            :   LongitudinalDistanceOppositeDirectionEgoCorrectLane = 1,
      52                 :            : 
      53                 :            :   /*!
      54                 :            :    * longitudinal, opposite direction
      55                 :            :    */
      56                 :            :   LongitudinalDistanceOppositeDirection = 2,
      57                 :            : 
      58                 :            :   /*!
      59                 :            :    * longitudinal, same direction, ego in front
      60                 :            :    */
      61                 :            :   LongitudinalDistanceSameDirectionEgoFront = 3,
      62                 :            : 
      63                 :            :   /*!
      64                 :            :    * longitudinal, same direction, ego at back
      65                 :            :    */
      66                 :            :   LongitudinalDistanceSameDirectionOtherInFront = 4,
      67                 :            : 
      68                 :            :   /*!
      69                 :            :    * lateral
      70                 :            :    */
      71                 :            :   LateralDistance = 5,
      72                 :            : 
      73                 :            :   /*!
      74                 :            :    * intersection, other has prio, ego can stop
      75                 :            :    */
      76                 :            :   IntersectionOtherPriorityEgoAbleToStop = 6,
      77                 :            : 
      78                 :            :   /*!
      79                 :            :    * intersection, ego has prio, other can stop
      80                 :            :    */
      81                 :            :   IntersectionEgoPriorityOtherAbleToStop = 7,
      82                 :            : 
      83                 :            :   /*!
      84                 :            :    * intersection, ego in front
      85                 :            :    */
      86                 :            :   IntersectionEgoInFront = 8,
      87                 :            : 
      88                 :            :   /*!
      89                 :            :    * intersection, other in front
      90                 :            :    */
      91                 :            :   IntersectionOtherInFront = 9,
      92                 :            : 
      93                 :            :   /*!
      94                 :            :    * intersection, overlap
      95                 :            :    */
      96                 :            :   IntersectionOverlap = 10
      97                 :            : };
      98                 :            : 
      99                 :            : } // namespace state
     100                 :            : } // namespace rss
     101                 :            : } // namespace ad
     102                 :            : /*!
     103                 :            :  * \brief Conversion of ::ad::rss::state::RssStateEvaluator to std::string helper.
     104                 :            :  */
     105                 :            : std::string toString(::ad::rss::state::RssStateEvaluator const e);
     106                 :            : 
     107                 :            : /*!
     108                 :            :  * \brief Conversion from std::string to enum type T helper.
     109                 :            :  *
     110                 :            :  * \param [in] str - a fully qualified string name of enum class type
     111                 :            :  *
     112                 :            :  * \return T enum value
     113                 :            :  *
     114                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
     115                 :            :  *
     116                 :            :  * Example usage:
     117                 :            :  * \code
     118                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
     119                 :            :  *   assert(value == SomeEnumType::eValue);
     120                 :            :  *   // Or:
     121                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
     122                 :            :  *   assert(value == SomeEnumType::eValue);
     123                 :            :  * \endcode
     124                 :            :  */
     125                 :            : template <typename EnumType> EnumType fromString(std::string const &str);
     126                 :            : 
     127                 :            : /*!
     128                 :            :  * \brief Conversion from std::string to enum type T helper.
     129                 :            :  *
     130                 :            :  * \param [in] str - a fully qualified string name of enum class type
     131                 :            :  *
     132                 :            :  * \return T enum value
     133                 :            :  *
     134                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
     135                 :            :  *
     136                 :            :  * Example usage:
     137                 :            :  * \code
     138                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
     139                 :            :  *   assert(value == SomeEnumType::eValue);
     140                 :            :  *   // Or:
     141                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
     142                 :            :  *   assert(value == SomeEnumType::eValue);
     143                 :            :  * \endcode
     144                 :            :  */
     145                 :            : template <>::ad::rss::state::RssStateEvaluator fromString(std::string const &str);
     146                 :            : 
     147                 :            : /*!
     148                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     149                 :            :  */
     150                 :            : #ifndef GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR
     151                 :            : #define GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR
     152                 :            : /*!
     153                 :            :  * @brief namespace ad
     154                 :            :  */
     155                 :            : namespace ad {
     156                 :            : /*!
     157                 :            :  * @brief namespace rss
     158                 :            :  */
     159                 :            : namespace rss {
     160                 :            : /*!
     161                 :            :  * @brief namespace state
     162                 :            :  */
     163                 :            : namespace state {
     164                 :            : 
     165                 :            : /**
     166                 :            :  * \brief standard ostream operator
     167                 :            :  *
     168                 :            :  * \param[in] os The output stream to write to
     169                 :            :  * \param[in] value RssStateEvaluator value
     170                 :            :  *
     171                 :            :  * \returns The stream object.
     172                 :            :  *
     173                 :            :  */
     174                 :    3048560 : inline std::ostream &operator<<(std::ostream &os, RssStateEvaluator const &value)
     175                 :            : {
     176         [ +  - ]:    3048560 :   return os << toString(value);
     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 RssStateEvaluator
     186                 :            :  */
     187                 :            : inline std::string to_string(::ad::rss::state::RssStateEvaluator const &value)
     188                 :            : {
     189                 :            :   return ::toString(value);
     190                 :            : }
     191                 :            : } // namespace std
     192                 :            : #endif // GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR

Generated by: LCOV version 1.14