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