diff options
| author | Christoph Berg <myon@debian.org> | 2020-11-16 21:55:31 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-11-16 21:55:31 +0100 |
| commit | 62b7139bfe06fb6555de9a62ee3e62ccfd6e6cf1 (patch) | |
| tree | 3d9e4579a69060d2767ec2e9153b0ec60f78cb54 /Transceiver/Transceiver.hpp | |
| parent | 8bf7a33f24073bbed51789cb9aaf36ef9126e543 (diff) | |
| parent | 77922fa33547ce24535f2e514c9a112dcb496f18 (diff) | |
Update upstream source from tag 'upstream/2.3.0_rc2+repack'
Update to upstream version '2.3.0~rc2+repack'
with Debian dir c40ed5d87e465612e7c15c7b67791946a5dcf64c
Diffstat (limited to 'Transceiver/Transceiver.hpp')
| -rw-r--r-- | Transceiver/Transceiver.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Transceiver/Transceiver.hpp b/Transceiver/Transceiver.hpp index fa235bf8..655d1170 100644 --- a/Transceiver/Transceiver.hpp +++ b/Transceiver/Transceiver.hpp @@ -1,6 +1,11 @@ #ifndef TRANSCEIVER_HPP__ #define TRANSCEIVER_HPP__ +#include <iosfwd> + +#include <boost/log/trivial.hpp> +#include <boost/log/sources/severity_channel_logger.hpp> + #include <QObject> #include "qt_helpers.hpp" @@ -55,9 +60,11 @@ class Transceiver public: using Frequency = Radio::Frequency; + using logger_type = boost::log::sources::severity_channel_logger_mt<boost::log::trivial::severity_level>; protected: - Transceiver (QObject * parent) : QObject {parent} {} + Transceiver (logger_type *, QObject * parent); + logger_type& logger () const {return *logger_;} public: virtual ~Transceiver () {} @@ -108,6 +115,7 @@ public: friend QDebug operator << (QDebug, TransceiverState const&); friend bool operator != (TransceiverState const&, TransceiverState const&); + friend std::ostream& operator << (std::ostream&, Transceiver::TransceiverState const&); }; // @@ -150,6 +158,9 @@ public: // Ready to be destroyed. Q_SIGNAL void finished () const; + +private: + logger_type mutable * logger_; }; Q_DECLARE_METATYPE (Transceiver::TransceiverState); @@ -158,6 +169,8 @@ Q_DECLARE_METATYPE (Transceiver::TransceiverState); QDebug operator << (QDebug, Transceiver::TransceiverState const&); #endif +std::ostream& operator << (std::ostream&, Transceiver::TransceiverState const&); + ENUM_QDATASTREAM_OPS_DECL (Transceiver, MODE); ENUM_CONVERSION_OPS_DECL (Transceiver, MODE); |
