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/intersection/IntersectionType.hpp" 26 : : #include "ad/map/landmark/TrafficLightType.hpp" 27 : : #include "ad/physics/Distance.hpp" 28 : : /*! 29 : : * @brief namespace ad 30 : : */ 31 : : namespace ad { 32 : : /*! 33 : : * @brief namespace map 34 : : */ 35 : : namespace map { 36 : : /*! 37 : : * @brief namespace config 38 : : * 39 : : * Configuration 40 : : */ 41 : : namespace config { 42 : : 43 : : /*! 44 : : * \brief DataType MapEntry 45 : : * 46 : : * Holds a filename of a map and some settings used when loading the map 47 : : */ 48 : 897 : struct MapEntry 49 : : { 50 : : /*! 51 : : * \brief Smart pointer on MapEntry 52 : : */ 53 : : typedef std::shared_ptr<MapEntry> Ptr; 54 : : 55 : : /*! 56 : : * \brief Smart pointer on constant MapEntry 57 : : */ 58 : : typedef std::shared_ptr<MapEntry const> ConstPtr; 59 : : 60 : : /*! 61 : : * \brief standard constructor 62 : : */ 63 : 930 : MapEntry() = default; 64 : : 65 : : /*! 66 : : * \brief standard destructor 67 : : */ 68 : 944 : ~MapEntry() = default; 69 : : 70 : : /*! 71 : : * \brief standard copy constructor 72 : : */ 73 : 13 : MapEntry(const MapEntry &other) = default; 74 : : 75 : : /*! 76 : : * \brief standard move constructor 77 : : */ 78 : 1 : MapEntry(MapEntry &&other) = default; 79 : : 80 : : /** 81 : : * \brief standard assignment operator 82 : : * 83 : : * \param[in] other Other MapEntry 84 : : * 85 : : * \returns Reference to this MapEntry. 86 : : */ 87 : : MapEntry &operator=(const MapEntry &other) = default; 88 : : 89 : : /** 90 : : * \brief standard move operator 91 : : * 92 : : * \param[in] other Other MapEntry 93 : : * 94 : : * \returns Reference to this MapEntry. 95 : : */ 96 : : MapEntry &operator=(MapEntry &&other) = default; 97 : : 98 : : /** 99 : : * \brief standard comparison operator 100 : : * 101 : : * \param[in] other Other MapEntry 102 : : * 103 : : * \returns \c true if both MapEntry are equal 104 : : */ 105 : 14 : bool operator==(const MapEntry &other) const 106 : : { 107 [ + + ]: 26 : return (filename == other.filename) && (openDriveOverlapMargin == other.openDriveOverlapMargin) 108 [ + + ]: 10 : && (openDriveDefaultIntersectionType == other.openDriveDefaultIntersectionType) 109 [ + + + + ]: 26 : && (openDriveDefaultTrafficLightType == other.openDriveDefaultTrafficLightType); 110 : : } 111 : : 112 : : /** 113 : : * \brief standard comparison operator 114 : : * 115 : : * \param[in] other Other MapEntry. 116 : : * 117 : : * \returns \c true if both MapEntry are different 118 : : */ 119 : 5 : bool operator!=(const MapEntry &other) const 120 : : { 121 : 5 : return !operator==(other); 122 : : } 123 : : 124 : : /*! 125 : : * holds the fully qualified path name of the map file 126 : : */ 127 : : std::string filename; 128 : : 129 : : /*! 130 : : * optional parameter for open drive maps defining the margin to be used when calculating lane overlaps 131 : : */ 132 : : ::ad::physics::Distance openDriveOverlapMargin{0.}; 133 : : 134 : : /*! 135 : : * The default intersection type 136 : : */ 137 : : ::ad::map::intersection::IntersectionType openDriveDefaultIntersectionType{ 138 : : ::ad::map::intersection::IntersectionType::Unknown}; 139 : : ::ad::map::landmark::TrafficLightType openDriveDefaultTrafficLightType{ 140 : : ::ad::map::landmark::TrafficLightType::SOLID_RED_YELLOW_GREEN}; 141 : : }; 142 : : 143 : : } // namespace config 144 : : } // namespace map 145 : : } // namespace ad 146 : : 147 : : /*! 148 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 149 : : */ 150 : : #ifndef GEN_GUARD_AD_MAP_CONFIG_MAPENTRY 151 : : #define GEN_GUARD_AD_MAP_CONFIG_MAPENTRY 152 : : /*! 153 : : * @brief namespace ad 154 : : */ 155 : : namespace ad { 156 : : /*! 157 : : * @brief namespace map 158 : : */ 159 : : namespace map { 160 : : /*! 161 : : * @brief namespace config 162 : : * 163 : : * Configuration 164 : : */ 165 : : namespace config { 166 : : 167 : : /** 168 : : * \brief standard ostream operator 169 : : * 170 : : * \param[in] os The output stream to write to 171 : : * \param[in] _value MapEntry value 172 : : * 173 : : * \returns The stream object. 174 : : * 175 : : */ 176 : 9 : inline std::ostream &operator<<(std::ostream &os, MapEntry const &_value) 177 : : { 178 : 9 : os << "MapEntry("; 179 : 9 : os << "filename:"; 180 : 9 : os << _value.filename; 181 : 9 : os << ","; 182 : 9 : os << "openDriveOverlapMargin:"; 183 : 9 : os << _value.openDriveOverlapMargin; 184 : 9 : os << ","; 185 : 9 : os << "openDriveDefaultIntersectionType:"; 186 : 9 : os << _value.openDriveDefaultIntersectionType; 187 : 9 : os << ","; 188 : 9 : os << "openDriveDefaultTrafficLightType:"; 189 : 9 : os << _value.openDriveDefaultTrafficLightType; 190 : 9 : os << ")"; 191 : 9 : return os; 192 : : } 193 : : 194 : : } // namespace config 195 : : } // namespace map 196 : : } // namespace ad 197 : : 198 : : namespace std { 199 : : /*! 200 : : * \brief overload of the std::to_string for MapEntry 201 : : */ 202 : 1 : inline std::string to_string(::ad::map::config::MapEntry const &value) 203 : : { 204 [ + - ]: 2 : stringstream sstream; 205 [ + - ]: 1 : sstream << value; 206 [ + - ]: 2 : return sstream.str(); 207 : : } 208 : : } // namespace std 209 : : #endif // GEN_GUARD_AD_MAP_CONFIG_MAPENTRY