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