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