LCOV - code coverage report
Current view: top level - generated/include/ad/rss/situation - LongitudinalRelativePosition.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 LongitudinalRelativePosition
      38                 :            :  *
      39                 :            :  * Enumeration describing the relative longitudinal position between two objects, a and b, within their situation
      40                 :            :  * coordinate system.
      41                 :            :  */
      42                 :            : enum class LongitudinalRelativePosition : int32_t
      43                 :            : {
      44                 :            :   /*!
      45                 :            :    * The object a is completely in front of object b. This means there is an actual longitudinal space between them.
      46                 :            :    */
      47                 :            :   InFront = 0,
      48                 :            : 
      49                 :            :   /*!
      50                 :            :    * The objects overlap. The front border of object a is in front of the front border of object b AND the back border
      51                 :            :    * of object a is in front of the back border of object b.
      52                 :            :    */
      53                 :            :   OverlapFront = 1,
      54                 :            : 
      55                 :            :   /*!
      56                 :            :    * The objects overlap, but neither the conditions for OverlapFront nor OverlapBack are applicable.
      57                 :            :    */
      58                 :            :   Overlap = 2,
      59                 :            : 
      60                 :            :   /*!
      61                 :            :    * The objects overlap. The front border of object a is at back of the front border of object b AND the back border of
      62                 :            :    * object a is at back of the back border of object b.
      63                 :            :    */
      64                 :            :   OverlapBack = 3,
      65                 :            : 
      66                 :            :   /*!
      67                 :            :    * The object a is completely at back of object b. This means there is an actual longitudinal space between them.
      68                 :            :    */
      69                 :            :   AtBack = 4
      70                 :            : };
      71                 :            : 
      72                 :            : } // namespace situation
      73                 :            : } // namespace rss
      74                 :            : } // namespace ad
      75                 :            : /*!
      76                 :            :  * \brief Conversion of ::ad::rss::situation::LongitudinalRelativePosition to std::string helper.
      77                 :            :  */
      78                 :            : std::string toString(::ad::rss::situation::LongitudinalRelativePosition const e);
      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 <typename EnumType> EnumType fromString(std::string const &str);
      99                 :            : 
     100                 :            : /*!
     101                 :            :  * \brief Conversion from std::string to enum type T helper.
     102                 :            :  *
     103                 :            :  * \param [in] str - a fully qualified string name of enum class type
     104                 :            :  *
     105                 :            :  * \return T enum value
     106                 :            :  *
     107                 :            :  * \throws std::out_of_range exception if the given string does not match any enum type
     108                 :            :  *
     109                 :            :  * Example usage:
     110                 :            :  * \code
     111                 :            :  *   auto value = fromString<SomeEnumType>("SomeEnumType::eValue");
     112                 :            :  *   assert(value == SomeEnumType::eValue);
     113                 :            :  *   // Or:
     114                 :            :  *   auto value = fromString<SomeEnumType>("eValue");
     115                 :            :  *   assert(value == SomeEnumType::eValue);
     116                 :            :  * \endcode
     117                 :            :  */
     118                 :            : template <>::ad::rss::situation::LongitudinalRelativePosition fromString(std::string const &str);
     119                 :            : 
     120                 :            : /*!
     121                 :            :  * \brief protect the definition of functions from duplicates by typedef usage within other data types
     122                 :            :  */
     123                 :            : #ifndef GEN_GUARD_AD_RSS_SITUATION_LONGITUDINALRELATIVEPOSITION
     124                 :            : #define GEN_GUARD_AD_RSS_SITUATION_LONGITUDINALRELATIVEPOSITION
     125                 :            : /*!
     126                 :            :  * @brief namespace ad
     127                 :            :  */
     128                 :            : namespace ad {
     129                 :            : /*!
     130                 :            :  * @brief namespace rss
     131                 :            :  */
     132                 :            : namespace rss {
     133                 :            : /*!
     134                 :            :  * @brief namespace situation
     135                 :            :  */
     136                 :            : namespace situation {
     137                 :            : 
     138                 :            : /**
     139                 :            :  * \brief standard ostream operator
     140                 :            :  *
     141                 :            :  * \param[in] os The output stream to write to
     142                 :            :  * \param[in] value LongitudinalRelativePosition value
     143                 :            :  *
     144                 :            :  * \returns The stream object.
     145                 :            :  *
     146                 :            :  */
     147                 :    1004090 : inline std::ostream &operator<<(std::ostream &os, LongitudinalRelativePosition const &value)
     148                 :            : {
     149         [ +  - ]:    1004090 :   return os << toString(value);
     150                 :            : }
     151                 :            : 
     152                 :            : } // namespace situation
     153                 :            : } // namespace rss
     154                 :            : } // namespace ad
     155                 :            : 
     156                 :            : namespace std {
     157                 :            : /*!
     158                 :            :  * \brief overload of the std::to_string for LongitudinalRelativePosition
     159                 :            :  */
     160                 :            : inline std::string to_string(::ad::rss::situation::LongitudinalRelativePosition const &value)
     161                 :            : {
     162                 :            :   return ::toString(value);
     163                 :            : }
     164                 :            : } // namespace std
     165                 :            : #endif // GEN_GUARD_AD_RSS_SITUATION_LONGITUDINALRELATIVEPOSITION

Generated by: LCOV version 1.14