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

Generated by: LCOV version 1.14