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