LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - ObjectType.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 2 2 100.0 %
Date: 2024-05-02 09:41:50 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 ObjectType
      38                 :            :  *
      39                 :            :  * Enumeration describing the types of object.
      40                 :            :  */
      41                 :            : enum class ObjectType : int32_t
      42                 :            : {
      43                 :            :   /*!
      44                 :            :    * The object type is invalid.
      45                 :            :    */
      46                 :            :   Invalid = 0,
      47                 :            : 
      48                 :            :   /*!
      49                 :            :    * The object is the ego vehicle.
      50                 :            :    */
      51                 :            :   EgoVehicle = 1,
      52                 :            : 
      53                 :            :   /*!
      54                 :            :    * The object is some other real vehicle.
      55                 :            :    */
      56                 :            :   OtherVehicle = 2,
      57                 :            : 
      58                 :            :   /*!
      59                 :            :    * The object is a pedestrian
      60                 :            :    */
      61                 :            :   Pedestrian = 3,
      62                 :            : 
      63                 :            :   /*!
      64                 :            :    * The object is an artificial one.
      65                 :            :    */
      66                 :            :   ArtificialObject = 4
      67                 :            : };
      68                 :            : 
      69                 :            : } // namespace world
      70                 :            : } // namespace rss
      71                 :            : } // namespace ad
      72                 :            : /*!
      73                 :            :  * \brief Conversion of ::ad::rss::world::ObjectType to std::string helper.
      74                 :            :  */
      75                 :            : std::string toString(::ad::rss::world::ObjectType const e);
      76                 :            : 
      77                 :            : /*!
      78                 :            :  * \brief Conversion from std::string to enum type T helper.
      79                 :            :  *
      80                 :            :  * \param [in] str - a fully qualified string name of enum class type
      81                 :            :  *
      82                 :            :  * \return T enum value
      83                 :            :  *
      84                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
      85                 :            :  *
      86                 :            :  * Example usage:
      87                 :            :  * \code
      88                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
      89                 :            :  *   assert(value == SomeEnumType::eValue);
      90                 :            :  *   // Or:
      91                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
      92                 :            :  *   assert(value == SomeEnumType::eValue);
      93                 :            :  * \endcode
      94                 :            :  */
      95                 :            : template <typename EnumType> EnumType fromString(std::string const &str);
      96                 :            : 
      97                 :            : /*!
      98                 :            :  * \brief Conversion from std::string to enum type T helper.
      99                 :            :  *
     100                 :            :  * \param [in] str - a fully qualified string name of enum class type
     101                 :            :  *
     102                 :            :  * \return T enum value
     103                 :            :  *
     104                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
     105                 :            :  *
     106                 :            :  * Example usage:
     107                 :            :  * \code
     108                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
     109                 :            :  *   assert(value == SomeEnumType::eValue);
     110                 :            :  *   // Or:
     111                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
     112                 :            :  *   assert(value == SomeEnumType::eValue);
     113                 :            :  * \endcode
     114                 :            :  */
     115                 :            : template <>::ad::rss::world::ObjectType fromString(std::string const &str);
     116                 :            : 
     117                 :            : /*!
     118                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     119                 :            :  */
     120                 :            : #ifndef GEN_GUARD_AD_RSS_WORLD_OBJECTTYPE
     121                 :            : #define GEN_GUARD_AD_RSS_WORLD_OBJECTTYPE
     122                 :            : /*!
     123                 :            :  * @brief namespace ad
     124                 :            :  */
     125                 :            : namespace ad {
     126                 :            : /*!
     127                 :            :  * @brief namespace rss
     128                 :            :  */
     129                 :            : namespace rss {
     130                 :            : /*!
     131                 :            :  * @brief namespace world
     132                 :            :  */
     133                 :            : namespace world {
     134                 :            : 
     135                 :            : /**
     136                 :            :  * \brief standard ostream operator
     137                 :            :  *
     138                 :            :  * \param[in] os The output stream to write to
     139                 :            :  * \param[in] value ObjectType value
     140                 :            :  *
     141                 :            :  * \returns The stream object.
     142                 :            :  *
     143                 :            :  */
     144                 :    4023430 : inline std::ostream &operator<<(std::ostream &os, ObjectType const &value)
     145                 :            : {
     146         [ +  - ]:    4023430 :   return os << toString(value);
     147                 :            : }
     148                 :            : 
     149                 :            : } // namespace world
     150                 :            : } // namespace rss
     151                 :            : } // namespace ad
     152                 :            : 
     153                 :            : namespace std {
     154                 :            : /*!
     155                 :            :  * \brief overload of the std::to_string for ObjectType
     156                 :            :  */
     157                 :            : inline std::string to_string(::ad::rss::world::ObjectType const &value)
     158                 :            : {
     159                 :            :   return ::toString(value);
     160                 :            : }
     161                 :            : } // namespace std
     162                 :            : #endif // GEN_GUARD_AD_RSS_WORLD_OBJECTTYPE

Generated by: LCOV version 1.14