From 1c8d1245ad865dc5544d6f7815dcb1e9338e65a0 Mon Sep 17 00:00:00 2001 From: Alexey Rybalchenko Date: Wed, 16 Nov 2022 19:53:36 +0100 Subject: [PATCH] Add operator<< to fair::mq::Channel --- fairmq/Channel.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fairmq/Channel.h b/fairmq/Channel.h index c72e777d..411ba588 100644 --- a/fairmq/Channel.h +++ b/fairmq/Channel.h @@ -19,6 +19,7 @@ #include // int64_t #include // unique_ptr, shared_ptr +#include #include #include #include // std::move @@ -380,6 +381,14 @@ class Channel static constexpr int DefaultPortRangeMax = 23000; static constexpr bool DefaultAutoBind = true; + friend std::ostream& operator<<(std::ostream& os, const Channel& ch) + { + return os << "name: " << ch.fName + << ", type: " << ch.fType + << ", method: " << ch.fMethod + << ", address: " << ch.fAddress; + } + private: std::shared_ptr fTransportFactory; mq::Transport fTransportType;