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