LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - LaneSegmentType.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 2 2 100.0 %
Date: 2024-04-30 13:12:49 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 world
      33                 :            :  */
      34                 :            : namespace world {
      35                 :            : 
      36                 :            : /*!
      37                 :            :  * \brief DataType LaneSegmentType
      38                 :            :  */
      39                 :            : enum class LaneSegmentType : int32_t
      40                 :            : {
      41                 :            :   /*!
      42                 :            :    * Normal lane segement. Nothing special to consider.
      43                 :            :    */
      44                 :            :   Normal = 0,
      45                 :            : 
      46                 :            :   /*!
      47                 :            :    * Lane segment is intersecting with another lane segment of the intersecting road.
      48                 :            :    */
      49                 :            :   Intersection = 1
      50                 :            : };
      51                 :            : 
      52                 :            : } // namespace world
      53                 :            : } // namespace rss
      54                 :            : } // namespace ad
      55                 :            : /*!
      56                 :            :  * \brief Conversion of ::ad::rss::world::LaneSegmentType to std::string helper.
      57                 :            :  */
      58                 :            : std::string toString(::ad::rss::world::LaneSegmentType const e);
      59                 :            : 
      60                 :            : /*!
      61                 :            :  * \brief Conversion from std::string to enum type T helper.
      62                 :            :  *
      63                 :            :  * \param [in] str - a fully qualified string name of enum class type
      64                 :            :  *
      65                 :            :  * \return T enum value
      66                 :            :  *
      67                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
      68                 :            :  *
      69                 :            :  * Example usage:
      70                 :            :  * \code
      71                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
      72                 :            :  *   assert(value == SomeEnumType::eValue);
      73                 :            :  *   // Or:
      74                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
      75                 :            :  *   assert(value == SomeEnumType::eValue);
      76                 :            :  * \endcode
      77                 :            :  */
      78                 :            : template <typename EnumType> EnumType fromString(std::string const &str);
      79                 :            : 
      80                 :            : /*!
      81                 :            :  * \brief Conversion from std::string to enum type T helper.
      82                 :            :  *
      83                 :            :  * \param [in] str - a fully qualified string name of enum class type
      84                 :            :  *
      85                 :            :  * \return T enum value
      86                 :            :  *
      87                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
      88                 :            :  *
      89                 :            :  * Example usage:
      90                 :            :  * \code
      91                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
      92                 :            :  *   assert(value == SomeEnumType::eValue);
      93                 :            :  *   // Or:
      94                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
      95                 :            :  *   assert(value == SomeEnumType::eValue);
      96                 :            :  * \endcode
      97                 :            :  */
      98                 :            : template <>::ad::rss::world::LaneSegmentType fromString(std::string const &str);
      99                 :            : 
     100                 :            : /*!
     101                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     102                 :            :  */
     103                 :            : #ifndef GEN_GUARD_AD_RSS_WORLD_LANESEGMENTTYPE
     104                 :            : #define GEN_GUARD_AD_RSS_WORLD_LANESEGMENTTYPE
     105                 :            : /*!
     106                 :            :  * @brief namespace ad
     107                 :            :  */
     108                 :            : namespace ad {
     109                 :            : /*!
     110                 :            :  * @brief namespace rss
     111                 :            :  */
     112                 :            : namespace rss {
     113                 :            : /*!
     114                 :            :  * @brief namespace world
     115                 :            :  */
     116                 :            : namespace world {
     117                 :            : 
     118                 :            : /**
     119                 :            :  * \brief standard ostream operator
     120                 :            :  *
     121                 :            :  * \param[in] os The output stream to write to
     122                 :            :  * \param[in] value LaneSegmentType value
     123                 :            :  *
     124                 :            :  * \returns The stream object.
     125                 :            :  *
     126                 :            :  */
     127                 :       6632 : inline std::ostream &operator<<(std::ostream &os, LaneSegmentType const &value)
     128                 :            : {
     129         [ +  - ]:       6632 :   return os << toString(value);
     130                 :            : }
     131                 :            : 
     132                 :            : } // namespace world
     133                 :            : } // namespace rss
     134                 :            : } // namespace ad
     135                 :            : 
     136                 :            : namespace std {
     137                 :            : /*!
     138                 :            :  * \brief overload of the std::to_string for LaneSegmentType
     139                 :            :  */
     140                 :            : inline std::string to_string(::ad::rss::world::LaneSegmentType const &value)
     141                 :            : {
     142                 :            :   return ::toString(value);
     143                 :            : }
     144                 :            : } // namespace std
     145                 :            : #endif // GEN_GUARD_AD_RSS_WORLD_LANESEGMENTTYPE

Generated by: LCOV version 1.14