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

Generated by: LCOV version 1.14