Add operator<< to fair::mq::Channel

This commit is contained in:
Alexey Rybalchenko 2022-11-16 19:53:36 +01:00
parent ac661dfd63
commit 1c8d1245ad

View File

@ -19,6 +19,7 @@
#include <cstdint> // int64_t
#include <memory> // unique_ptr, shared_ptr
#include <ostream>
#include <stdexcept>
#include <string>
#include <utility> // 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<TransportFactory> fTransportFactory;
mq::Transport fTransportType;