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