LCOV - code coverage report
Current view: top level - generated/include/ad/rss/situation - SituationType.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 2 2 100.0 %
Date: 2024-04-23 14:35:54 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 situation
      33                 :            :  */
      34                 :            : namespace situation {
      35                 :            : 
      36                 :            : /*!
      37                 :            :  * \brief DataType SituationType
      38                 :            :  *
      39                 :            :  * Enumeration describing the type of situation.
      40                 :            :  */
      41                 :            : enum class SituationType : int32_t
      42                 :            : {
      43                 :            :   /*!
      44                 :            :    * The other vehicle cannot conflict with the ego vehicle. This kind of situations are always considered to be safe.
      45                 :            :    * Use this situation state to make the object visible in the result vector to be a known object, but not relevant for
      46                 :            :    * RSS (e.g. object in opposite direction, but already passed by).
      47                 :            :    */
      48                 :            :   NotRelevant = 0,
      49                 :            : 
      50                 :            :   /*!
      51                 :            :    * Both drive on the same road in the same direction.
      52                 :            :    */
      53                 :            :   SameDirection = 1,
      54                 :            : 
      55                 :            :   /*!
      56                 :            :    * Both drive on the same road in the opposite direction.
      57                 :            :    */
      58                 :            :   OppositeDirection = 2,
      59                 :            : 
      60                 :            :   /*!
      61                 :            :    * Both drive on individual roads which intersect at the end. Ego vehicle has priority over object.
      62                 :            :    */
      63                 :            :   IntersectionEgoHasPriority = 3,
      64                 :            : 
      65                 :            :   /*!
      66                 :            :    * Both drive on individual roads which intersect at the end. Object has priority over ego vehicle.
      67                 :            :    */
      68                 :            :   IntersectionObjectHasPriority = 4,
      69                 :            : 
      70                 :            :   /*!
      71                 :            :    * Both drive on individual roads which intersect at the end. Object and ego vehicle have same priority.
      72                 :            :    */
      73                 :            :   IntersectionSamePriority = 5,
      74                 :            : 
      75                 :            :   /*!
      76                 :            :    * An unstructured scene constellation.
      77                 :            :    */
      78                 :            :   Unstructured = 6
      79                 :            : };
      80                 :            : 
      81                 :            : } // namespace situation
      82                 :            : } // namespace rss
      83                 :            : } // namespace ad
      84                 :            : /*!
      85                 :            :  * \brief Conversion of ::ad::rss::situation::SituationType to std::string helper.
      86                 :            :  */
      87                 :            : std::string toString(::ad::rss::situation::SituationType const e);
      88                 :            : 
      89                 :            : /*!
      90                 :            :  * \brief Conversion from std::string to enum type T helper.
      91                 :            :  *
      92                 :            :  * \param [in] str - a fully qualified string name of enum class type
      93                 :            :  *
      94                 :            :  * \return T enum value
      95                 :            :  *
      96                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
      97                 :            :  *
      98                 :            :  * Example usage:
      99                 :            :  * \code
     100                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
     101                 :            :  *   assert(value == SomeEnumType::eValue);
     102                 :            :  *   // Or:
     103                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
     104                 :            :  *   assert(value == SomeEnumType::eValue);
     105                 :            :  * \endcode
     106                 :            :  */
     107                 :            : template <typename EnumType> EnumType fromString(std::string const &str);
     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 <>::ad::rss::situation::SituationType fromString(std::string const &str);
     128                 :            : 
     129                 :            : /*!
     130                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     131                 :            :  */
     132                 :            : #ifndef GEN_GUARD_AD_RSS_SITUATION_SITUATIONTYPE
     133                 :            : #define GEN_GUARD_AD_RSS_SITUATION_SITUATIONTYPE
     134                 :            : /*!
     135                 :            :  * @brief namespace ad
     136                 :            :  */
     137                 :            : namespace ad {
     138                 :            : /*!
     139                 :            :  * @brief namespace rss
     140                 :            :  */
     141                 :            : namespace rss {
     142                 :            : /*!
     143                 :            :  * @brief namespace situation
     144                 :            :  */
     145                 :            : namespace situation {
     146                 :            : 
     147                 :            : /**
     148                 :            :  * \brief standard ostream operator
     149                 :            :  *
     150                 :            :  * \param[in] os The output stream to write to
     151                 :            :  * \param[in] value SituationType value
     152                 :            :  *
     153                 :            :  * \returns The stream object.
     154                 :            :  *
     155                 :            :  */
     156                 :    3023520 : inline std::ostream &operator<<(std::ostream &os, SituationType const &value)
     157                 :            : {
     158         [ +  - ]:    3023520 :   return os << toString(value);
     159                 :            : }
     160                 :            : 
     161                 :            : } // namespace situation
     162                 :            : } // namespace rss
     163                 :            : } // namespace ad
     164                 :            : 
     165                 :            : namespace std {
     166                 :            : /*!
     167                 :            :  * \brief overload of the std::to_string for SituationType
     168                 :            :  */
     169                 :            : inline std::string to_string(::ad::rss::situation::SituationType const &value)
     170                 :            : {
     171                 :            :   return ::toString(value);
     172                 :            : }
     173                 :            : } // namespace std
     174                 :            : #endif // GEN_GUARD_AD_RSS_SITUATION_SITUATIONTYPE

Generated by: LCOV version 1.14