diff --git a/ddspipe_core/include/ddspipe_core/types/dds/TopicQoS.hpp b/ddspipe_core/include/ddspipe_core/types/dds/TopicQoS.hpp index 8f6634da..17657990 100644 --- a/ddspipe_core/include/ddspipe_core/types/dds/TopicQoS.hpp +++ b/ddspipe_core/include/ddspipe_core/types/dds/TopicQoS.hpp @@ -210,6 +210,15 @@ std::ostream& operator <<( std::ostream& os, const DurabilityKind& kind); +/** + * @brief The operator << must be overloaded for Fuzzy so that the \c DurabilityKind overloaded operator << gets + * called. + */ +DDSPIPE_CORE_DllAPI +std::ostream& operator <<( + std::ostream& os, + const utils::Fuzzy& qos); + /** * @brief \c ReliabilityKind to stream serialization */ @@ -218,6 +227,15 @@ std::ostream& operator <<( std::ostream& os, const ReliabilityKind& kind); +/** + * @brief The operator << must be overloaded for Fuzzy so that the \c ReliabilityKind overloaded operator << gets + * called. + */ +DDSPIPE_CORE_DllAPI +std::ostream& operator <<( + std::ostream& os, + const utils::Fuzzy& qos); + /** * @brief \c OwnershipQosPolicyKind to stream serialization */ @@ -226,6 +244,15 @@ std::ostream& operator <<( std::ostream& os, const OwnershipQosPolicyKind& qos); +/** + * @brief The operator << must be overloaded for Fuzzy so that the \c OwnershipQosPolicyKind overloaded operator << gets + * called. + */ +DDSPIPE_CORE_DllAPI +std::ostream& operator <<( + std::ostream& os, + const utils::Fuzzy& qos); + /** * @brief \c TopicQoS to stream serialization */ diff --git a/ddspipe_core/src/cpp/types/dds/TopicQoS.cpp b/ddspipe_core/src/cpp/types/dds/TopicQoS.cpp index 41e2f6a8..2a5ee41b 100644 --- a/ddspipe_core/src/cpp/types/dds/TopicQoS.cpp +++ b/ddspipe_core/src/cpp/types/dds/TopicQoS.cpp @@ -177,6 +177,14 @@ std::ostream& operator <<( return os; } +std::ostream& operator <<( + std::ostream& os, + const utils::Fuzzy& qos) +{ + os << "Fuzzy{Level(" << qos.get_level_as_str() << ") " << qos.get_reference() << "}"; + return os; +} + std::ostream& operator <<( std::ostream& os, const ReliabilityKind& kind) @@ -199,6 +207,14 @@ std::ostream& operator <<( return os; } +std::ostream& operator <<( + std::ostream& os, + const utils::Fuzzy& qos) +{ + os << "Fuzzy{Level(" << qos.get_level_as_str() << ") " << qos.get_reference() << "}"; + return os; +} + std::ostream& operator <<( std::ostream& os, const OwnershipQosPolicyKind& kind) @@ -221,14 +237,23 @@ std::ostream& operator <<( return os; } +std::ostream& operator <<( + std::ostream& os, + const utils::Fuzzy& qos) +{ + os << "Fuzzy{Level(" << qos.get_level_as_str() << ") " << qos.get_reference() << "}"; + return os; +} + std::ostream& operator <<( std::ostream& os, const TopicQoS& qos) { os << - "TopicQoS{" << qos.durability_qos << - ";" << qos.reliability_qos << - ";" << qos.ownership_qos << + "TopicQoS{" << + "durability(" << qos.durability_qos << ")" << + ";reliability(" << qos.reliability_qos << ")" << + ";ownership(" << qos.ownership_qos << ")" << (qos.has_partitions() ? ";partitions" : "") << (qos.keyed ? ";keyed" : "") << ";depth(" << qos.history_depth << ")" <<