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/point/ParaPoint.hpp" 25 : : #include "ad/physics/Distance.hpp" 26 : : #include "ad/physics/RatioValue.hpp" 27 : : /*! 28 : : * @brief namespace ad 29 : : */ 30 : : namespace ad { 31 : : /*! 32 : : * @brief namespace map 33 : : */ 34 : : namespace map { 35 : : /*! 36 : : * @brief namespace match 37 : : * 38 : : * Map matching 39 : : */ 40 : : namespace match { 41 : : 42 : : /*! 43 : : * \brief DataType LanePoint 44 : : * 45 : : * Defines a point on a lane. 46 : : * Besides the parametric offsets in longitudinal and lateral direction also the length 47 : : * and width of the lane at this point. 48 : : */ 49 : : struct LanePoint 50 : : { 51 : : /*! 52 : : * \brief Smart pointer on LanePoint 53 : : */ 54 : : typedef std::shared_ptr<LanePoint> Ptr; 55 : : 56 : : /*! 57 : : * \brief Smart pointer on constant LanePoint 58 : : */ 59 : : typedef std::shared_ptr<LanePoint const> ConstPtr; 60 : : 61 : : /*! 62 : : * \brief standard constructor 63 : : */ 64 : 938291 : LanePoint() = default; 65 : : 66 : : /*! 67 : : * \brief standard destructor 68 : : */ 69 : : ~LanePoint() = default; 70 : : 71 : : /*! 72 : : * \brief standard copy constructor 73 : : */ 74 : : LanePoint(const LanePoint &other) = default; 75 : : 76 : : /*! 77 : : * \brief standard move constructor 78 : : */ 79 : : LanePoint(LanePoint &&other) = default; 80 : : 81 : : /** 82 : : * \brief standard assignment operator 83 : : * 84 : : * \param[in] other Other LanePoint 85 : : * 86 : : * \returns Reference to this LanePoint. 87 : : */ 88 : : LanePoint &operator=(const LanePoint &other) = default; 89 : : 90 : : /** 91 : : * \brief standard move operator 92 : : * 93 : : * \param[in] other Other LanePoint 94 : : * 95 : : * \returns Reference to this LanePoint. 96 : : */ 97 : : LanePoint &operator=(LanePoint &&other) = default; 98 : : 99 : : /** 100 : : * \brief standard comparison operator 101 : : * 102 : : * \param[in] other Other LanePoint 103 : : * 104 : : * \returns \c true if both LanePoint are equal 105 : : */ 106 : 48 : bool operator==(const LanePoint &other) const 107 : : { 108 [ + + + + ]: 92 : return (paraPoint == other.paraPoint) && (lateralT == other.lateralT) && (laneLength == other.laneLength) 109 [ + + + + ]: 92 : && (laneWidth == other.laneWidth); 110 : : } 111 : : 112 : : /** 113 : : * \brief standard comparison operator 114 : : * 115 : : * \param[in] other Other LanePoint. 116 : : * 117 : : * \returns \c true if both LanePoint are different 118 : : */ 119 : 5 : bool operator!=(const LanePoint &other) const 120 : : { 121 : 5 : return !operator==(other); 122 : : } 123 : : 124 : : ::ad::map::point::ParaPoint paraPoint; 125 : : ::ad::physics::RatioValue lateralT; 126 : : 127 : : /*! 128 : : * Length of lane 129 : : */ 130 : : ::ad::physics::Distance laneLength; 131 : : 132 : : /*! 133 : : * Width of lane 134 : : */ 135 : : ::ad::physics::Distance laneWidth; 136 : : }; 137 : : 138 : : } // namespace match 139 : : } // namespace map 140 : : } // namespace ad 141 : : 142 : : /*! 143 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 144 : : */ 145 : : #ifndef GEN_GUARD_AD_MAP_MATCH_LANEPOINT 146 : : #define GEN_GUARD_AD_MAP_MATCH_LANEPOINT 147 : : /*! 148 : : * @brief namespace ad 149 : : */ 150 : : namespace ad { 151 : : /*! 152 : : * @brief namespace map 153 : : */ 154 : : namespace map { 155 : : /*! 156 : : * @brief namespace match 157 : : * 158 : : * Map matching 159 : : */ 160 : : namespace match { 161 : : 162 : : /** 163 : : * \brief standard ostream operator 164 : : * 165 : : * \param[in] os The output stream to write to 166 : : * \param[in] _value LanePoint value 167 : : * 168 : : * \returns The stream object. 169 : : * 170 : : */ 171 : 45 : inline std::ostream &operator<<(std::ostream &os, LanePoint const &_value) 172 : : { 173 : 45 : os << "LanePoint("; 174 : 45 : os << "paraPoint:"; 175 : 45 : os << _value.paraPoint; 176 : 45 : os << ","; 177 : 45 : os << "lateralT:"; 178 : 45 : os << _value.lateralT; 179 : 45 : os << ","; 180 : 45 : os << "laneLength:"; 181 : 45 : os << _value.laneLength; 182 : 45 : os << ","; 183 : 45 : os << "laneWidth:"; 184 : 45 : os << _value.laneWidth; 185 : 45 : os << ")"; 186 : 45 : return os; 187 : : } 188 : : 189 : : } // namespace match 190 : : } // namespace map 191 : : } // namespace ad 192 : : 193 : : namespace std { 194 : : /*! 195 : : * \brief overload of the std::to_string for LanePoint 196 : : */ 197 : 1 : inline std::string to_string(::ad::map::match::LanePoint const &value) 198 : : { 199 [ + - ]: 2 : stringstream sstream; 200 [ + - ]: 1 : sstream << value; 201 [ + - ]: 2 : return sstream.str(); 202 : : } 203 : : } // namespace std 204 : : #endif // GEN_GUARD_AD_MAP_MATCH_LANEPOINT