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/LandmarkIdList.hpp" 25 : : #include "ad/map/lane/ComplianceVersion.hpp" 26 : : #include "ad/map/lane/ContactLaneList.hpp" 27 : : #include "ad/map/lane/LaneDirection.hpp" 28 : : #include "ad/map/lane/LaneId.hpp" 29 : : #include "ad/map/lane/LaneType.hpp" 30 : : #include "ad/map/point/BoundingSphere.hpp" 31 : : #include "ad/map/point/Geometry.hpp" 32 : : #include "ad/map/restriction/Restrictions.hpp" 33 : : #include "ad/map/restriction/SpeedLimitList.hpp" 34 : : #include "ad/physics/Distance.hpp" 35 : : #include "ad/physics/MetricRange.hpp" 36 : : /*! 37 : : * @brief namespace ad 38 : : */ 39 : : namespace ad { 40 : : /*! 41 : : * @brief namespace map 42 : : */ 43 : : namespace map { 44 : : /*! 45 : : * @brief namespace lane 46 : : * 47 : : * Handling of lanes 48 : : */ 49 : : namespace lane { 50 : : 51 : : /*! 52 : : * \brief DataType Lane 53 : : * 54 : : * Specification of a lane 55 : : */ 56 : 23 : struct Lane 57 : : { 58 : : /*! 59 : : * \brief Smart pointer on Lane 60 : : */ 61 : : typedef std::shared_ptr<Lane> Ptr; 62 : : 63 : : /*! 64 : : * \brief Smart pointer on constant Lane 65 : : */ 66 : : typedef std::shared_ptr<Lane const> ConstPtr; 67 : : 68 : : /*! 69 : : * \brief standard constructor 70 : : */ 71 [ # # # # : 48745 : Lane() = default; # # # # # # ] 72 : : 73 : : /*! 74 : : * \brief standard destructor 75 : : */ 76 : 296104 : ~Lane() = default; 77 : : 78 : : /*! 79 : : * \brief standard copy constructor 80 : : */ 81 [ + - + - : 247358 : Lane(const Lane &other) = default; + - + - + - ] 82 : : 83 : : /*! 84 : : * \brief standard move constructor 85 : : */ 86 : 1 : Lane(Lane &&other) = default; 87 : : 88 : : /** 89 : : * \brief standard assignment operator 90 : : * 91 : : * \param[in] other Other Lane 92 : : * 93 : : * \returns Reference to this Lane. 94 : : */ 95 : : Lane &operator=(const Lane &other) = default; 96 : : 97 : : /** 98 : : * \brief standard move operator 99 : : * 100 : : * \param[in] other Other Lane 101 : : * 102 : : * \returns Reference to this Lane. 103 : : */ 104 : : Lane &operator=(Lane &&other) = default; 105 : : 106 : : /** 107 : : * \brief standard comparison operator 108 : : * 109 : : * \param[in] other Other Lane 110 : : * 111 : : * \returns \c true if both Lane are equal 112 : : */ 113 : 39 : bool operator==(const Lane &other) const 114 : : { 115 [ + + + + ]: 76 : return (id == other.id) && (type == other.type) && (direction == other.direction) 116 [ + + + + : 33 : && (restrictions == other.restrictions) && (length == other.length) && (lengthRange == other.lengthRange) + + ] 117 [ + + + + : 27 : && (width == other.width) && (widthRange == other.widthRange) && (speedLimits == other.speedLimits) + + ] 118 [ + + + + : 21 : && (edgeLeft == other.edgeLeft) && (edgeRight == other.edgeRight) && (contactLanes == other.contactLanes) + + ] 119 [ + + + + ]: 15 : && (complianceVersion == other.complianceVersion) && (boundingSphere == other.boundingSphere) 120 [ + + + + ]: 76 : && (visibleLandmarks == other.visibleLandmarks); 121 : : } 122 : : 123 : : /** 124 : : * \brief standard comparison operator 125 : : * 126 : : * \param[in] other Other Lane. 127 : : * 128 : : * \returns \c true if both Lane are different 129 : : */ 130 : 16 : bool operator!=(const Lane &other) const 131 : : { 132 : 16 : return !operator==(other); 133 : : } 134 : : 135 : : /*! 136 : : * Identifier of the lane 137 : : */ 138 : : ::ad::map::lane::LaneId id; 139 : : 140 : : /*! 141 : : * Type of the lane 142 : : */ 143 : : ::ad::map::lane::LaneType type; 144 : : 145 : : /*! 146 : : * Driving direction of the lane 147 : : */ 148 : : ::ad::map::lane::LaneDirection direction{::ad::map::lane::LaneDirection::INVALID}; 149 : : 150 : : /*! 151 : : * List of restrictions 152 : : */ 153 : : ::ad::map::restriction::Restrictions restrictions; 154 : : 155 : : /*! 156 : : * Length of the lane 157 : : */ 158 : : ::ad::physics::Distance length; 159 : : ::ad::physics::MetricRange lengthRange; 160 : : 161 : : /*! 162 : : * Width of the lane 163 : : */ 164 : : ::ad::physics::Distance width; 165 : : ::ad::physics::MetricRange widthRange; 166 : : 167 : : /*! 168 : : * List of speed limits 169 : : */ 170 : : ::ad::map::restriction::SpeedLimitList speedLimits; 171 : : 172 : : /*! 173 : : * Left edge of the lane 174 : : */ 175 : : ::ad::map::point::Geometry edgeLeft; 176 : : 177 : : /*! 178 : : * Right edge of the lane 179 : : */ 180 : : ::ad::map::point::Geometry edgeRight; 181 : : 182 : : /*! 183 : : * List of contacting lanes 184 : : */ 185 : : ::ad::map::lane::ContactLaneList contactLanes; 186 : : ::ad::map::lane::ComplianceVersion complianceVersion; 187 : : ::ad::map::point::BoundingSphere boundingSphere; 188 : : 189 : : /*! 190 : : * List of visible landmarks 191 : : */ 192 : : ::ad::map::landmark::LandmarkIdList visibleLandmarks; 193 : : }; 194 : : 195 : : } // namespace lane 196 : : } // namespace map 197 : : } // namespace ad 198 : : 199 : : /*! 200 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 201 : : */ 202 : : #ifndef GEN_GUARD_AD_MAP_LANE_LANE 203 : : #define GEN_GUARD_AD_MAP_LANE_LANE 204 : : /*! 205 : : * @brief namespace ad 206 : : */ 207 : : namespace ad { 208 : : /*! 209 : : * @brief namespace map 210 : : */ 211 : : namespace map { 212 : : /*! 213 : : * @brief namespace lane 214 : : * 215 : : * Handling of lanes 216 : : */ 217 : : namespace lane { 218 : : 219 : : /** 220 : : * \brief standard ostream operator 221 : : * 222 : : * \param[in] os The output stream to write to 223 : : * \param[in] _value Lane value 224 : : * 225 : : * \returns The stream object. 226 : : * 227 : : */ 228 : 22 : inline std::ostream &operator<<(std::ostream &os, Lane const &_value) 229 : : { 230 : 22 : os << "Lane("; 231 : 22 : os << "id:"; 232 : 22 : os << _value.id; 233 : 22 : os << ","; 234 : 22 : os << "type:"; 235 : 22 : os << _value.type; 236 : 22 : os << ","; 237 : 22 : os << "direction:"; 238 : 22 : os << _value.direction; 239 : 22 : os << ","; 240 : 22 : os << "restrictions:"; 241 : 22 : os << _value.restrictions; 242 : 22 : os << ","; 243 : 22 : os << "length:"; 244 : 22 : os << _value.length; 245 : 22 : os << ","; 246 : 22 : os << "lengthRange:"; 247 : 22 : os << _value.lengthRange; 248 : 22 : os << ","; 249 : 22 : os << "width:"; 250 : 22 : os << _value.width; 251 : 22 : os << ","; 252 : 22 : os << "widthRange:"; 253 : 22 : os << _value.widthRange; 254 : 22 : os << ","; 255 : 22 : os << "speedLimits:"; 256 : 22 : os << _value.speedLimits; 257 : 22 : os << ","; 258 : 22 : os << "edgeLeft:"; 259 : 22 : os << _value.edgeLeft; 260 : 22 : os << ","; 261 : 22 : os << "edgeRight:"; 262 : 22 : os << _value.edgeRight; 263 : 22 : os << ","; 264 : 22 : os << "contactLanes:"; 265 : 22 : os << _value.contactLanes; 266 : 22 : os << ","; 267 : 22 : os << "complianceVersion:"; 268 : 22 : os << _value.complianceVersion; 269 : 22 : os << ","; 270 : 22 : os << "boundingSphere:"; 271 : 22 : os << _value.boundingSphere; 272 : 22 : os << ","; 273 : 22 : os << "visibleLandmarks:"; 274 : 22 : os << _value.visibleLandmarks; 275 : 22 : os << ")"; 276 : 22 : return os; 277 : : } 278 : : 279 : : } // namespace lane 280 : : } // namespace map 281 : : } // namespace ad 282 : : 283 : : namespace std { 284 : : /*! 285 : : * \brief overload of the std::to_string for Lane 286 : : */ 287 : 1 : inline std::string to_string(::ad::map::lane::Lane const &value) 288 : : { 289 [ + - ]: 2 : stringstream sstream; 290 [ + - ]: 1 : sstream << value; 291 [ + - ]: 2 : return sstream.str(); 292 : : } 293 : : } // namespace std 294 : : #endif // GEN_GUARD_AD_MAP_LANE_LANE