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