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 6 33.3 %
Date: 2025-07-22 06:53:46 Functions: 1 3 33.3 %
Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
       3                 :            :  *
       4                 :            :  * Copyright (C) 2018-2022 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-2046
      16                 :            :  */
      17                 :            : 
      18                 :            : #pragma once
      19                 :            : 
      20                 :            : #include <iostream>
      21                 :            : #include <memory>
      22                 :            : #include <string>
      23                 :            : #include "spdlog/fmt/ostr.h"
      24                 :            : #include "spdlog/spdlog.h"
      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 RssStateEvaluator
      40                 :            :  *
      41                 :            :  * The method used to evaluate the respone.
      42                 :            :  */
      43                 :            : enum class RssStateEvaluator : int32_t
      44                 :            : {
      45                 :            :   /*!
      46                 :            :    * Not evaluated.
      47                 :            :    */
      48                 :            :   None = 0,
      49                 :            : 
      50                 :            :   /*!
      51                 :            :    * longitudinal, opposite direction, correct lane
      52                 :            :    */
      53                 :            :   LongitudinalDistanceOppositeDirectionEgoCorrectLane = 1,
      54                 :            : 
      55                 :            :   /*!
      56                 :            :    * longitudinal, opposite direction
      57                 :            :    */
      58                 :            :   LongitudinalDistanceOppositeDirection = 2,
      59                 :            : 
      60                 :            :   /*!
      61                 :            :    * longitudinal, same direction, ego in front
      62                 :            :    */
      63                 :            :   LongitudinalDistanceSameDirectionEgoFront = 3,
      64                 :            : 
      65                 :            :   /*!
      66                 :            :    * longitudinal, same direction, ego at back
      67                 :            :    */
      68                 :            :   LongitudinalDistanceSameDirectionOtherInFront = 4,
      69                 :            : 
      70                 :            :   /*!
      71                 :            :    * lateral
      72                 :            :    */
      73                 :            :   LateralDistance = 5,
      74                 :            : 
      75                 :            :   /*!
      76                 :            :    * intersection, other has prio, ego can stop
      77                 :            :    */
      78                 :            :   IntersectionOtherPriorityEgoAbleToStop = 6,
      79                 :            : 
      80                 :            :   /*!
      81                 :            :    * intersection, ego has prio, other can stop
      82                 :            :    */
      83                 :            :   IntersectionEgoPriorityOtherAbleToStop = 7,
      84                 :            : 
      85                 :            :   /*!
      86                 :            :    * intersection, ego in front
      87                 :            :    */
      88                 :            :   IntersectionEgoInFront = 8,
      89                 :            : 
      90                 :            :   /*!
      91                 :            :    * intersection, other in front
      92                 :            :    */
      93                 :            :   IntersectionOtherInFront = 9,
      94                 :            : 
      95                 :            :   /*!
      96                 :            :    * intersection, overlap
      97                 :            :    */
      98                 :            :   IntersectionOverlap = 10
      99                 :            : };
     100                 :            : 
     101                 :            : } // namespace state
     102                 :            : } // namespace rss
     103                 :            : } // namespace ad
     104                 :            : /*!
     105                 :            :  * \brief Conversion of ::ad::rss::state::RssStateEvaluator to std::string helper.
     106                 :            :  */
     107                 :            : std::string toString(::ad::rss::state::RssStateEvaluator const e);
     108                 :            : 
     109                 :            : /*!
     110                 :            :  * \brief Conversion from std::string to enum type T helper.
     111                 :            :  *
     112                 :            :  * \param [in] str - a fully qualified string name of enum class type
     113                 :            :  *
     114                 :            :  * \return T enum value
     115                 :            :  *
     116                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
     117                 :            :  *
     118                 :            :  * Example usage:
     119                 :            :  * \code
     120                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
     121                 :            :  *   assert(value == SomeEnumType::eValue);
     122                 :            :  *   // Or:
     123                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
     124                 :            :  *   assert(value == SomeEnumType::eValue);
     125                 :            :  * \endcode
     126                 :            :  */
     127                 :            : template <typename EnumType> EnumType fromString(std::string const &str);
     128                 :            : 
     129                 :            : /*!
     130                 :            :  * \brief Conversion from std::string to enum type T helper.
     131                 :            :  *
     132                 :            :  * \param [in] str - a fully qualified string name of enum class type
     133                 :            :  *
     134                 :            :  * \return T enum value
     135                 :            :  *
     136                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
     137                 :            :  *
     138                 :            :  * Example usage:
     139                 :            :  * \code
     140                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
     141                 :            :  *   assert(value == SomeEnumType::eValue);
     142                 :            :  *   // Or:
     143                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
     144                 :            :  *   assert(value == SomeEnumType::eValue);
     145                 :            :  * \endcode
     146                 :            :  */
     147                 :            : template <>::ad::rss::state::RssStateEvaluator fromString(std::string const &str);
     148                 :            : 
     149                 :            : /*!
     150                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     151                 :            :  */
     152                 :            : #ifndef GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR
     153                 :            : #define GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR
     154                 :            : /*!
     155                 :            :  * @brief namespace ad
     156                 :            :  */
     157                 :            : namespace ad {
     158                 :            : /*!
     159                 :            :  * @brief namespace rss
     160                 :            :  */
     161                 :            : namespace rss {
     162                 :            : /*!
     163                 :            :  * @brief namespace state
     164                 :            :  */
     165                 :            : namespace state {
     166                 :            : 
     167                 :            : /**
     168                 :            :  * \brief standard ostream operator
     169                 :            :  *
     170                 :            :  * \param[in] os The output stream to write to
     171                 :            :  * \param[in] value RssStateEvaluator value
     172                 :            :  *
     173                 :            :  * \returns The stream object.
     174                 :            :  *
     175                 :            :  */
     176                 :         19 : inline std::ostream &operator<<(std::ostream &os, RssStateEvaluator const &value)
     177                 :            : {
     178         [ +  - ]:         19 :   return os << toString(value);
     179                 :            : }
     180                 :            : 
     181                 :            : } // namespace state
     182                 :            : } // namespace rss
     183                 :            : } // namespace ad
     184                 :            : 
     185                 :            : namespace std {
     186                 :            : /*!
     187                 :            :  * \brief overload of the std::to_string for RssStateEvaluator
     188                 :            :  */
     189                 :          0 : inline std::string to_string(::ad::rss::state::RssStateEvaluator const &value)
     190                 :            : {
     191                 :          0 :   return ::toString(value);
     192                 :            : }
     193                 :            : } // namespace std
     194                 :            : 
     195                 :            : /*!
     196                 :            :  * \brief overload of fmt::formatter calling std::to_string
     197                 :            :  */
     198                 :            : template <> struct fmt::formatter<::ad::rss::state::RssStateEvaluator> : formatter<string_view>
     199                 :            : {
     200                 :          0 :   template <typename FormatContext> auto format(::ad::rss::state::RssStateEvaluator const &value, FormatContext &ctx)
     201                 :            :   {
     202                 :          0 :     return formatter<string_view>::format(std::to_string(value), ctx);
     203                 :            :   }
     204                 :            : };
     205                 :            : 
     206                 :            : #endif // GEN_GUARD_AD_RSS_STATE_RSSSTATEEVALUATOR

Generated by: LCOV version 1.14