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 <limits> 22 : : #include <memory> 23 : : #include <sstream> 24 : : #include "ad/map/landmark/LandmarkId.hpp" 25 : : #include "ad/map/landmark/LandmarkType.hpp" 26 : : #include "ad/map/landmark/TrafficLightType.hpp" 27 : : #include "ad/map/point/ENUHeading.hpp" 28 : : #include "ad/map/point/ENUPoint.hpp" 29 : : /*! 30 : : * @brief namespace ad 31 : : */ 32 : : namespace ad { 33 : : /*! 34 : : * @brief namespace map 35 : : */ 36 : : namespace map { 37 : : /*! 38 : : * @brief namespace landmark 39 : : * 40 : : * Handling of landmarks 41 : : */ 42 : : namespace landmark { 43 : : 44 : : /*! 45 : : * \brief DataType ENULandmark 46 : : * 47 : : * Landmark description in ENU coordiante frame. 48 : : */ 49 : : struct ENULandmark 50 : : { 51 : : /*! 52 : : * \brief Smart pointer on ENULandmark 53 : : */ 54 : : typedef std::shared_ptr<ENULandmark> Ptr; 55 : : 56 : : /*! 57 : : * \brief Smart pointer on constant ENULandmark 58 : : */ 59 : : typedef std::shared_ptr<ENULandmark const> ConstPtr; 60 : : 61 : : /*! 62 : : * \brief standard constructor 63 : : */ 64 : 56 : ENULandmark() = default; 65 : : 66 : : /*! 67 : : * \brief standard destructor 68 : : */ 69 : : ~ENULandmark() = default; 70 : : 71 : : /*! 72 : : * \brief standard copy constructor 73 : : */ 74 : : ENULandmark(const ENULandmark &other) = default; 75 : : 76 : : /*! 77 : : * \brief standard move constructor 78 : : */ 79 : : ENULandmark(ENULandmark &&other) = default; 80 : : 81 : : /** 82 : : * \brief standard assignment operator 83 : : * 84 : : * \param[in] other Other ENULandmark 85 : : * 86 : : * \returns Reference to this ENULandmark. 87 : : */ 88 : : ENULandmark &operator=(const ENULandmark &other) = default; 89 : : 90 : : /** 91 : : * \brief standard move operator 92 : : * 93 : : * \param[in] other Other ENULandmark 94 : : * 95 : : * \returns Reference to this ENULandmark. 96 : : */ 97 : : ENULandmark &operator=(ENULandmark &&other) = default; 98 : : 99 : : /** 100 : : * \brief standard comparison operator 101 : : * 102 : : * \param[in] other Other ENULandmark 103 : : * 104 : : * \returns \c true if both ENULandmark are equal 105 : : */ 106 : 16 : bool operator==(const ENULandmark &other) const 107 : : { 108 [ + + + + : 30 : return (id == other.id) && (type == other.type) && (position == other.position) && (heading == other.heading) + + ] 109 [ + + + + ]: 30 : && (trafficLightType == other.trafficLightType); 110 : : } 111 : : 112 : : /** 113 : : * \brief standard comparison operator 114 : : * 115 : : * \param[in] other Other ENULandmark. 116 : : * 117 : : * \returns \c true if both ENULandmark are different 118 : : */ 119 : 6 : bool operator!=(const ENULandmark &other) const 120 : : { 121 : 6 : return !operator==(other); 122 : : } 123 : : 124 : : /*! 125 : : * Identifier of the landmark. 126 : : */ 127 : : ::ad::map::landmark::LandmarkId id{0}; 128 : : 129 : : /*! 130 : : * Type of the landmark. 131 : : */ 132 : : ::ad::map::landmark::LandmarkType type{::ad::map::landmark::LandmarkType::INVALID}; 133 : : 134 : : /*! 135 : : * Position of the landmark 136 : : */ 137 : : ::ad::map::point::ENUPoint position; 138 : : 139 : : /*! 140 : : * Landmark 2D orientation regardind Z axis (A.K.A. yaw/heading) [rad]Directional heading of the landmark. 141 : : */ 142 : : ::ad::map::point::ENUHeading heading; 143 : : ::ad::map::landmark::TrafficLightType trafficLightType{::ad::map::landmark::TrafficLightType::INVALID}; 144 : : }; 145 : : 146 : : } // namespace landmark 147 : : } // namespace map 148 : : } // namespace ad 149 : : 150 : : /*! 151 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 152 : : */ 153 : : #ifndef GEN_GUARD_AD_MAP_LANDMARK_ENULANDMARK 154 : : #define GEN_GUARD_AD_MAP_LANDMARK_ENULANDMARK 155 : : /*! 156 : : * @brief namespace ad 157 : : */ 158 : : namespace ad { 159 : : /*! 160 : : * @brief namespace map 161 : : */ 162 : : namespace map { 163 : : /*! 164 : : * @brief namespace landmark 165 : : * 166 : : * Handling of landmarks 167 : : */ 168 : : namespace landmark { 169 : : 170 : : /** 171 : : * \brief standard ostream operator 172 : : * 173 : : * \param[in] os The output stream to write to 174 : : * \param[in] _value ENULandmark value 175 : : * 176 : : * \returns The stream object. 177 : : * 178 : : */ 179 : 14 : inline std::ostream &operator<<(std::ostream &os, ENULandmark const &_value) 180 : : { 181 : 14 : os << "ENULandmark("; 182 : 14 : os << "id:"; 183 : 14 : os << _value.id; 184 : 14 : os << ","; 185 : 14 : os << "type:"; 186 : 14 : os << _value.type; 187 : 14 : os << ","; 188 : 14 : os << "position:"; 189 : 14 : os << _value.position; 190 : 14 : os << ","; 191 : 14 : os << "heading:"; 192 : 14 : os << _value.heading; 193 : 14 : os << ","; 194 : 14 : os << "trafficLightType:"; 195 : 14 : os << _value.trafficLightType; 196 : 14 : os << ")"; 197 : 14 : return os; 198 : : } 199 : : 200 : : } // namespace landmark 201 : : } // namespace map 202 : : } // namespace ad 203 : : 204 : : namespace std { 205 : : /*! 206 : : * \brief overload of the std::to_string for ENULandmark 207 : : */ 208 : 1 : inline std::string to_string(::ad::map::landmark::ENULandmark const &value) 209 : : { 210 [ + - ]: 2 : stringstream sstream; 211 [ + - ]: 1 : sstream << value; 212 [ + - ]: 2 : return sstream.str(); 213 : : } 214 : : } // namespace std 215 : : #endif // GEN_GUARD_AD_MAP_LANDMARK_ENULANDMARK