LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - LaneDrivingDirection.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 world
      35                 :            :  */
      36                 :            : namespace world {
      37                 :            : 
      38                 :            : /*!
      39                 :            :  * \brief DataType LaneDrivingDirection
      40                 :            :  */
      41                 :            : enum class LaneDrivingDirection : int32_t
      42                 :            : {
      43                 :            :   /*!
      44                 :            :    * Traffic flow in this lane segment is in both directions.
      45                 :            :    */
      46                 :            :   Bidirectional = 0,
      47                 :            : 
      48                 :            :   /*!
      49                 :            :    * Nominal traffic flow in this lane segment is positive RoadArea direction.
      50                 :            :    */
      51                 :            :   Positive = 1,
      52                 :            : 
      53                 :            :   /*!
      54                 :            :    * Nominal traffic flow in this lane segment is negative RoadArea direction.
      55                 :            :    */
      56                 :            :   Negative = 2
      57                 :            : };
      58                 :            : 
      59                 :            : } // namespace world
      60                 :            : } // namespace rss
      61                 :            : } // namespace ad
      62                 :            : /*!
      63                 :            :  * \brief Conversion of ::ad::rss::world::LaneDrivingDirection to std::string helper.
      64                 :            :  */
      65                 :            : std::string toString(::ad::rss::world::LaneDrivingDirection const e);
      66                 :            : 
      67                 :            : /*!
      68                 :            :  * \brief Conversion from std::string to enum type T helper.
      69                 :            :  *
      70                 :            :  * \param [in] str - a fully qualified string name of enum class type
      71                 :            :  *
      72                 :            :  * \return T enum value
      73                 :            :  *
      74                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
      75                 :            :  *
      76                 :            :  * Example usage:
      77                 :            :  * \code
      78                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
      79                 :            :  *   assert(value == SomeEnumType::eValue);
      80                 :            :  *   // Or:
      81                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
      82                 :            :  *   assert(value == SomeEnumType::eValue);
      83                 :            :  * \endcode
      84                 :            :  */
      85                 :            : template <typename EnumType> EnumType fromString(std::string const &str);
      86                 :            : 
      87                 :            : /*!
      88                 :            :  * \brief Conversion from std::string to enum type T helper.
      89                 :            :  *
      90                 :            :  * \param [in] str - a fully qualified string name of enum class type
      91                 :            :  *
      92                 :            :  * \return T enum value
      93                 :            :  *
      94                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
      95                 :            :  *
      96                 :            :  * Example usage:
      97                 :            :  * \code
      98                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
      99                 :            :  *   assert(value == SomeEnumType::eValue);
     100                 :            :  *   // Or:
     101                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
     102                 :            :  *   assert(value == SomeEnumType::eValue);
     103                 :            :  * \endcode
     104                 :            :  */
     105                 :            : template <>::ad::rss::world::LaneDrivingDirection fromString(std::string const &str);
     106                 :            : 
     107                 :            : /*!
     108                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     109                 :            :  */
     110                 :            : #ifndef GEN_GUARD_AD_RSS_WORLD_LANEDRIVINGDIRECTION
     111                 :            : #define GEN_GUARD_AD_RSS_WORLD_LANEDRIVINGDIRECTION
     112                 :            : /*!
     113                 :            :  * @brief namespace ad
     114                 :            :  */
     115                 :            : namespace ad {
     116                 :            : /*!
     117                 :            :  * @brief namespace rss
     118                 :            :  */
     119                 :            : namespace rss {
     120                 :            : /*!
     121                 :            :  * @brief namespace world
     122                 :            :  */
     123                 :            : namespace world {
     124                 :            : 
     125                 :            : /**
     126                 :            :  * \brief standard ostream operator
     127                 :            :  *
     128                 :            :  * \param[in] os The output stream to write to
     129                 :            :  * \param[in] value LaneDrivingDirection value
     130                 :            :  *
     131                 :            :  * \returns The stream object.
     132                 :            :  *
     133                 :            :  */
     134                 :         13 : inline std::ostream &operator<<(std::ostream &os, LaneDrivingDirection const &value)
     135                 :            : {
     136         [ +  - ]:         13 :   return os << toString(value);
     137                 :            : }
     138                 :            : 
     139                 :            : } // namespace world
     140                 :            : } // namespace rss
     141                 :            : } // namespace ad
     142                 :            : 
     143                 :            : namespace std {
     144                 :            : /*!
     145                 :            :  * \brief overload of the std::to_string for LaneDrivingDirection
     146                 :            :  */
     147                 :          0 : inline std::string to_string(::ad::rss::world::LaneDrivingDirection const &value)
     148                 :            : {
     149                 :          0 :   return ::toString(value);
     150                 :            : }
     151                 :            : } // namespace std
     152                 :            : 
     153                 :            : /*!
     154                 :            :  * \brief overload of fmt::formatter calling std::to_string
     155                 :            :  */
     156                 :            : template <> struct fmt::formatter<::ad::rss::world::LaneDrivingDirection> : formatter<string_view>
     157                 :            : {
     158                 :          0 :   template <typename FormatContext> auto format(::ad::rss::world::LaneDrivingDirection const &value, FormatContext &ctx)
     159                 :            :   {
     160                 :          0 :     return formatter<string_view>::format(std::to_string(value), ctx);
     161                 :            :   }
     162                 :            : };
     163                 :            : 
     164                 :            : #endif // GEN_GUARD_AD_RSS_WORLD_LANEDRIVINGDIRECTION

Generated by: LCOV version 1.14