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