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