Branch data Line data Source code
1 : : /* 2 : : * ----------------- BEGIN LICENSE BLOCK --------------------------------- 3 : : * 4 : : * Copyright (C) 2018-2022 Intel Corporation 5 : : * 6 : : * SPDX-License-Identifier: LGPL-2.1-only 7 : : * 8 : : * ----------------- END LICENSE BLOCK ----------------------------------- 9 : : */ 10 : : 11 : : /** 12 : : * Generated file 13 : : * @file 14 : : * 15 : : * Generator Version : 11.0.0-2046 16 : : */ 17 : : 18 : : #pragma once 19 : : 20 : : #include <iostream> 21 : : #include <memory> 22 : : #include <sstream> 23 : : #include "ad/rss/core/StructuredObjectState.hpp" 24 : : #include "ad/rss/world/ObjectState.hpp" 25 : : #include "ad/rss/world/ObjectType.hpp" 26 : : #include "ad/rss/world/RssDynamics.hpp" 27 : : /*! 28 : : * @brief namespace ad 29 : : */ 30 : : namespace ad { 31 : : /*! 32 : : * @brief namespace rss 33 : : */ 34 : : namespace rss { 35 : : /*! 36 : : * @brief namespace core 37 : : */ 38 : : namespace core { 39 : : 40 : : /*! 41 : : * \brief DataType RelativeObjectState 42 : : * 43 : : * The state of an object with structured and unstructured constellation data. 44 : : * The state consists of the object type, the dynamics, structured and unstructured 45 : : * object states. 46 : : */ 47 : : struct RelativeObjectState 48 : : { 49 : : /*! 50 : : * \brief Smart pointer on RelativeObjectState 51 : : */ 52 : : typedef std::shared_ptr<RelativeObjectState> Ptr; 53 : : 54 : : /*! 55 : : * \brief Smart pointer on constant RelativeObjectState 56 : : */ 57 : : typedef std::shared_ptr<RelativeObjectState const> ConstPtr; 58 : : 59 : : /*! 60 : : * \brief standard constructor 61 : : */ 62 : 10670 : RelativeObjectState() = default; 63 : : 64 : : /*! 65 : : * \brief standard destructor 66 : : */ 67 : : ~RelativeObjectState() = default; 68 : : 69 : : /*! 70 : : * \brief standard copy constructor 71 : : */ 72 : : RelativeObjectState(const RelativeObjectState &other) = default; 73 : : 74 : : /*! 75 : : * \brief standard move constructor 76 : : */ 77 : : RelativeObjectState(RelativeObjectState &&other) = default; 78 : : 79 : : /** 80 : : * \brief standard assignment operator 81 : : * 82 : : * \param[in] other Other RelativeObjectState 83 : : * 84 : : * \returns Reference to this RelativeObjectState. 85 : : */ 86 : : RelativeObjectState &operator=(const RelativeObjectState &other) = default; 87 : : 88 : : /** 89 : : * \brief standard move operator 90 : : * 91 : : * \param[in] other Other RelativeObjectState 92 : : * 93 : : * \returns Reference to this RelativeObjectState. 94 : : */ 95 : : RelativeObjectState &operator=(RelativeObjectState &&other) = default; 96 : : 97 : : /** 98 : : * \brief standard comparison operator 99 : : * 100 : : * \param[in] other Other RelativeObjectState 101 : : * 102 : : * \returns \c true if both RelativeObjectState are equal 103 : : */ 104 : 52 : bool operator==(const RelativeObjectState &other) const 105 : : { 106 [ + + ]: 46 : return (object_type == other.object_type) && (dynamics == other.dynamics) 107 [ + + ]: 44 : && (unstructured_object_state == other.unstructured_object_state) 108 [ + + + + ]: 98 : && (structured_object_state == other.structured_object_state); 109 : : } 110 : : 111 : : /** 112 : : * \brief standard comparison operator 113 : : * 114 : : * \param[in] other Other RelativeObjectState. 115 : : * 116 : : * \returns \c true if both RelativeObjectState are different 117 : : */ 118 : 5 : bool operator!=(const RelativeObjectState &other) const 119 : : { 120 : 5 : return !operator==(other); 121 : : } 122 : : 123 : : /*! 124 : : * The type of object. 125 : : */ 126 : : ::ad::rss::world::ObjectType object_type; 127 : : 128 : : /*! 129 : : * The constellation specific dynamics. 130 : : */ 131 : : ::ad::rss::world::RssDynamics dynamics; 132 : : 133 : : /*! 134 : : * The state of the object required to perform unstructured constellation calculations. 135 : : */ 136 : : ::ad::rss::world::ObjectState unstructured_object_state; 137 : : 138 : : /*! 139 : : * The state of the object required to perform structured constellation calculations. 140 : : */ 141 : : ::ad::rss::core::StructuredObjectState structured_object_state; 142 : : }; 143 : : 144 : : } // namespace core 145 : : } // namespace rss 146 : : } // namespace ad 147 : : 148 : : /*! 149 : : * \brief protect the definition of functions from duplicates by typedef usage within other data types 150 : : */ 151 : : #ifndef GEN_GUARD_AD_RSS_CORE_RELATIVEOBJECTSTATE 152 : : #define GEN_GUARD_AD_RSS_CORE_RELATIVEOBJECTSTATE 153 : : /*! 154 : : * @brief namespace ad 155 : : */ 156 : : namespace ad { 157 : : /*! 158 : : * @brief namespace rss 159 : : */ 160 : : namespace rss { 161 : : /*! 162 : : * @brief namespace core 163 : : */ 164 : : namespace core { 165 : : 166 : : /** 167 : : * \brief standard ostream operator 168 : : * 169 : : * \param[in] os The output stream to write to 170 : : * \param[in] _value RelativeObjectState value 171 : : * 172 : : * \returns The stream object. 173 : : * 174 : : */ 175 : 10 : inline std::ostream &operator<<(std::ostream &os, RelativeObjectState const &_value) 176 : : { 177 : 10 : os << "RelativeObjectState("; 178 : 10 : os << "object_type:"; 179 : 10 : os << _value.object_type; 180 : 10 : os << ","; 181 : 10 : os << "dynamics:"; 182 : 10 : os << _value.dynamics; 183 : 10 : os << ","; 184 : 10 : os << "unstructured_object_state:"; 185 : 10 : os << _value.unstructured_object_state; 186 : 10 : os << ","; 187 : 10 : os << "structured_object_state:"; 188 : 10 : os << _value.structured_object_state; 189 : 10 : os << ")"; 190 : 10 : return os; 191 : : } 192 : : 193 : : } // namespace core 194 : : } // namespace rss 195 : : } // namespace ad 196 : : 197 : : namespace std { 198 : : /*! 199 : : * \brief overload of the std::to_string for RelativeObjectState 200 : : */ 201 : 1 : inline std::string to_string(::ad::rss::core::RelativeObjectState const &value) 202 : : { 203 [ + - ]: 1 : stringstream sstream; 204 [ + - ]: 1 : sstream << value; 205 [ + - ]: 2 : return sstream.str(); 206 : 1 : } 207 : : } // namespace std 208 : : 209 : : /*! 210 : : * \brief overload of fmt::formatter calling std::to_string 211 : : */ 212 : : template <> struct fmt::formatter<::ad::rss::core::RelativeObjectState> : formatter<string_view> 213 : : { 214 : 0 : template <typename FormatContext> auto format(::ad::rss::core::RelativeObjectState const &value, FormatContext &ctx) 215 : : { 216 : 0 : return formatter<string_view>::format(std::to_string(value), ctx); 217 : : } 218 : : }; 219 : : 220 : : #endif // GEN_GUARD_AD_RSS_CORE_RELATIVEOBJECTSTATE