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