Branch data Line data Source code
1 : : /* 2 : : * ----------------- BEGIN LICENSE BLOCK --------------------------------- 3 : : * 4 : : * Copyright (C) 2018-2020 Intel Corporation 5 : : * 6 : : * SPDX-License-Identifier: MIT 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 map 29 : : */ 30 : : namespace map { 31 : : /*! 32 : : * @brief namespace lane 33 : : * 34 : : * Handling of lanes 35 : : */ 36 : : namespace lane { 37 : : 38 : : /*! 39 : : * \brief DataType ContactLocation 40 : : * 41 : : * Specification of the location of the contact of an object. 42 : : */ 43 : : enum class ContactLocation : int32_t 44 : : { 45 : : /*! 46 : : * Invalid value. 47 : : */ 48 : : INVALID = 0, 49 : : 50 : : /*! 51 : : * Unknown value. 52 : : */ 53 : : UNKNOWN = 1, 54 : : 55 : : /*! 56 : : * Another object is on Left from this object. 57 : : */ 58 : : LEFT = 2, 59 : : 60 : : /*! 61 : : * Another object is on Right from this object. 62 : : */ 63 : : RIGHT = 3, 64 : : 65 : : /*! 66 : : * Another object is an Successor of this object. 67 : : */ 68 : : SUCCESSOR = 4, 69 : : 70 : : /*! 71 : : * Another object is an Predecessor of this object. 72 : : */ 73 : : PREDECESSOR = 5, 74 : : 75 : : /*! 76 : : * Another object Overlaps this object. 77 : : */ 78 : : OVERLAP = 6 79 : : }; 80 : : 81 : : } // namespace lane 82 : : } // namespace map 83 : : } // namespace ad 84 : : /*! 85 : : * \brief Conversion of ::ad::map::lane::ContactLocation to std::string helper. 86 : : */ 87 : : std::string toString(::ad::map::lane::ContactLocation const e); 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 <typename EnumType> EnumType fromString(std::string const &str); 108 : : 109 : : /*! 110 : : * \brief Conversion from std::string to enum type T helper. 111 : : * 112 : : * \param [in] str - a fully qualified string name of enum class type 113 : : * 114 : : * \return T enum value 115 : : * 116 : : * \throws std::out_of_range exception if the given string does not match any enum type 117 : : * 118 : : * Example usage: 119 : : * \code 120 : : * auto value = fromString<SomeEnumType>("SomeEnumType::eValue"); 121 : : * assert(value == SomeEnumType::eValue); 122 : : * // Or: 123 : : * auto value = fromString<SomeEnumType>("eValue"); 124 : : * assert(value == SomeEnumType::eValue); 125 : : * \endcode 126 : : */ 127 : : template <>::ad::map::lane::ContactLocation fromString(std::string const &str); 128 : : 129 : : /*! 130 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 131 : : */ 132 : : #ifndef GEN_GUARD_AD_MAP_LANE_CONTACTLOCATION 133 : : #define GEN_GUARD_AD_MAP_LANE_CONTACTLOCATION 134 : : /*! 135 : : * @brief namespace ad 136 : : */ 137 : : namespace ad { 138 : : /*! 139 : : * @brief namespace map 140 : : */ 141 : : namespace map { 142 : : /*! 143 : : * @brief namespace lane 144 : : * 145 : : * Handling of lanes 146 : : */ 147 : : namespace lane { 148 : : 149 : : /** 150 : : * \brief standard ostream operator 151 : : * 152 : : * \param[in] os The output stream to write to 153 : : * \param[in] value ContactLocation value 154 : : * 155 : : * \returns The stream object. 156 : : * 157 : : */ 158 : 34 : inline std::ostream &operator<<(std::ostream &os, ContactLocation const &value) 159 : : { 160 [ + - ]: 34 : return os << toString(value); 161 : : } 162 : : 163 : : } // namespace lane 164 : : } // namespace map 165 : : } // namespace ad 166 : : 167 : : namespace std { 168 : : /*! 169 : : * \brief overload of the std::to_string for ContactLocation 170 : : */ 171 : : inline std::string to_string(::ad::map::lane::ContactLocation const &value) 172 : : { 173 : : return ::toString(value); 174 : : } 175 : : } // namespace std 176 : : #endif // GEN_GUARD_AD_MAP_LANE_CONTACTLOCATION