X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fcpp-common%2Fbt2%2Fmessage.hpp;h=77321778ad0394e6e81482400219a8f0731524e5;hb=HEAD;hp=da006a5f50ea30cfc7f50cbf7d88c21aee71f95e;hpb=bd7dbf87c742c1c4016f487d490f913c7dd09834;p=babeltrace.git diff --git a/src/cpp-common/bt2/message.hpp b/src/cpp-common/bt2/message.hpp index da006a5f..77321778 100644 --- a/src/cpp-common/bt2/message.hpp +++ b/src/cpp-common/bt2/message.hpp @@ -7,41 +7,44 @@ #ifndef BABELTRACE_CPP_COMMON_BT2_MESSAGE_HPP #define BABELTRACE_CPP_COMMON_BT2_MESSAGE_HPP -#include #include -#include +#include + #include #include "common/assert.h" -#include "common/common.h" -#include "internal/borrowed-obj.hpp" -#include "internal/shared-obj.hpp" +#include "cpp-common/bt2/clock-snapshot.hpp" +#include "cpp-common/bt2/trace-ir.hpp" +#include "cpp-common/bt2s/optional.hpp" +#include "cpp-common/vendor/wise-enum/wise_enum.h" + +#include "borrowed-object.hpp" #include "internal/utils.hpp" -#include "cpp-common/optional.hpp" -#include "cpp-common/string_view.hpp" -#include "exc.hpp" +#include "optional-borrowed-object.hpp" +#include "shared-object.hpp" +#include "trace-ir.hpp" namespace bt2 { namespace internal { struct MessageRefFuncs final { - static void get(const bt_message * const libObjPtr) + static void get(const bt_message * const libObjPtr) noexcept { bt_message_get_ref(libObjPtr); } - static void put(const bt_message * const libObjPtr) + static void put(const bt_message * const libObjPtr) noexcept { bt_message_put_ref(libObjPtr); } }; -template -using SharedMessage = internal::SharedObj; - } /* namespace internal */ +template +using SharedMessage = SharedObject; + template class CommonStreamBeginningMessage; @@ -66,47 +69,54 @@ class CommonDiscardedPacketsMessage; template class CommonMessageIteratorInactivityMessage; -enum class MessageType -{ - STREAM_BEGINNING = BT_MESSAGE_TYPE_STREAM_BEGINNING, - STREAM_END = BT_MESSAGE_TYPE_STREAM_END, - EVENT = BT_MESSAGE_TYPE_EVENT, - PACKET_BEGINNING = BT_MESSAGE_TYPE_PACKET_BEGINNING, - PACKET_END = BT_MESSAGE_TYPE_PACKET_END, - DISCARDED_EVENTS = BT_MESSAGE_TYPE_DISCARDED_EVENTS, - DISCARDED_PACKETS = BT_MESSAGE_TYPE_DISCARDED_PACKETS, - MESSAGE_ITERATOR_INACTIVITY = BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY, -}; +/* clang-format off */ + +WISE_ENUM_CLASS(MessageType, + (StreamBeginning, BT_MESSAGE_TYPE_STREAM_BEGINNING), + (StreamEnd, BT_MESSAGE_TYPE_STREAM_END), + (Event, BT_MESSAGE_TYPE_EVENT), + (PacketBeginning, BT_MESSAGE_TYPE_PACKET_BEGINNING), + (PacketEnd, BT_MESSAGE_TYPE_PACKET_END), + (DiscardedEvents, BT_MESSAGE_TYPE_DISCARDED_EVENTS), + (DiscardedPackets, BT_MESSAGE_TYPE_DISCARDED_PACKETS), + (MessageIteratorInactivity, BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY)); + +/* clang-format on */ template -class CommonMessage : public internal::BorrowedObj +class CommonMessage : public BorrowedObject { private: - using typename internal::BorrowedObj::_ThisBorrowedObj; + using typename BorrowedObject::_ThisBorrowedObject; protected: - using typename internal::BorrowedObj::_LibObjPtr; using _ThisCommonMessage = CommonMessage; public: - using Shared = internal::SharedMessage, LibObjT>; + using typename BorrowedObject::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonMessage(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr} + explicit CommonMessage(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr} { } template - CommonMessage(const CommonMessage val) noexcept : _ThisBorrowedObj {val} + CommonMessage(const CommonMessage val) noexcept : _ThisBorrowedObject {val} { } template - _ThisCommonMessage& operator=(const CommonMessage val) noexcept + _ThisCommonMessage operator=(const CommonMessage val) noexcept { - _ThisBorrowedObj::operator=(val); + _ThisBorrowedObject::operator=(val); return *this; } + CommonMessage asConst() const noexcept + { + return CommonMessage {*this}; + } + MessageType type() const noexcept { return static_cast(bt_message_get_type(this->libObjPtr())); @@ -114,42 +124,42 @@ public: bool isStreamBeginning() const noexcept { - return this->type() == MessageType::STREAM_BEGINNING; + return this->type() == MessageType::StreamBeginning; } bool isStreamEnd() const noexcept { - return this->type() == MessageType::STREAM_END; + return this->type() == MessageType::StreamEnd; } bool isEvent() const noexcept { - return this->type() == MessageType::EVENT; + return this->type() == MessageType::Event; } bool isPacketBeginning() const noexcept { - return this->type() == MessageType::PACKET_BEGINNING; + return this->type() == MessageType::PacketBeginning; } bool isPacketEnd() const noexcept { - return this->type() == MessageType::PACKET_END; + return this->type() == MessageType::PacketEnd; } bool isDiscardedEvents() const noexcept { - return this->type() == MessageType::DISCARDED_EVENTS; + return this->type() == MessageType::DiscardedEvents; } bool isDiscardedPackets() const noexcept { - return this->type() == MessageType::DISCARDED_PACKETS; + return this->type() == MessageType::DiscardedPackets; } bool isMessageIteratorInactivity() const noexcept { - return this->type() == MessageType::MESSAGE_ITERATOR_INACTIVITY; + return this->type() == MessageType::MessageIteratorInactivity; } Shared shared() const noexcept @@ -223,17 +233,14 @@ template class CommonStreamBeginningMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; - - using _Stream = - typename std::conditional::value, CommonStream, - CommonStream>::type; + using _Stream = internal::DepStream; public: - using Shared = internal::SharedMessage, LibObjT>; + using typename CommonMessage::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonStreamBeginningMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonStreamBeginningMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isStreamBeginning()); @@ -246,43 +253,50 @@ public: } template - CommonStreamBeginningMessage& + CommonStreamBeginningMessage operator=(const CommonStreamBeginningMessage val) noexcept { _ThisCommonMessage::operator=(val); return *this; } - ConstStream stream() const noexcept + CommonStreamBeginningMessage asConst() const noexcept { - return ConstStream {internal::CommonStreamBeginningMessageSpec::stream( - this->libObjPtr())}; + return CommonStreamBeginningMessage {*this}; } - _Stream stream() noexcept + _Stream stream() const noexcept { return _Stream { internal::CommonStreamBeginningMessageSpec::stream(this->libObjPtr())}; } - void defaultClockSnapshot(const std::uint64_t val) noexcept + OptionalBorrowedObject streamClassDefaultClockClass() const noexcept { - static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); + return bt_message_stream_beginning_borrow_stream_class_default_clock_class_const( + this->libObjPtr()); + } + + CommonStreamBeginningMessage defaultClockSnapshot(const std::uint64_t val) const noexcept + { + static_assert(!std::is_const::value, + "Not available with `bt2::ConstStreamBeginningMessage`."); bt_message_stream_beginning_set_default_clock_snapshot(this->libObjPtr(), val); + return *this; } - nonstd::optional defaultClockSnapshot() const noexcept + OptionalBorrowedObject defaultClockSnapshot() const noexcept { const bt_clock_snapshot *libObjPtr; const auto state = bt_message_stream_beginning_borrow_default_clock_snapshot_const( this->libObjPtr(), &libObjPtr); if (state == BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_KNOWN) { - return ConstClockSnapshot {libObjPtr}; + return libObjPtr; } - return nonstd::nullopt; + return {}; } Shared shared() const noexcept @@ -341,17 +355,14 @@ template class CommonStreamEndMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; - - using _Stream = - typename std::conditional::value, CommonStream, - CommonStream>::type; + using _Stream = internal::DepStream; public: - using Shared = internal::SharedMessage, LibObjT>; + using typename CommonMessage::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonStreamEndMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonStreamEndMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isStreamEnd()); @@ -364,42 +375,49 @@ public: } template - CommonStreamEndMessage& + CommonStreamEndMessage operator=(const CommonStreamEndMessage val) noexcept { _ThisCommonMessage::operator=(val); return *this; } - ConstStream stream() const noexcept + CommonStreamEndMessage asConst() const noexcept { - return ConstStream { - internal::CommonStreamEndMessageSpec::stream(this->libObjPtr())}; + return CommonStreamEndMessage {*this}; } - _Stream stream() noexcept + _Stream stream() const noexcept { return _Stream {internal::CommonStreamEndMessageSpec::stream(this->libObjPtr())}; } - void defaultClockSnapshot(const std::uint64_t val) noexcept + OptionalBorrowedObject streamClassDefaultClockClass() const noexcept { - static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); + return bt_message_stream_end_borrow_stream_class_default_clock_class_const( + this->libObjPtr()); + } + + CommonStreamEndMessage defaultClockSnapshot(const std::uint64_t val) const noexcept + { + static_assert(!std::is_const::value, + "Not available with `bt2::ConstStreamEndMessage`."); bt_message_stream_end_set_default_clock_snapshot(this->libObjPtr(), val); + return *this; } - nonstd::optional defaultClockSnapshot() const noexcept + OptionalBorrowedObject defaultClockSnapshot() const noexcept { const bt_clock_snapshot *libObjPtr; const auto state = bt_message_stream_end_borrow_default_clock_snapshot_const( this->libObjPtr(), &libObjPtr); if (state == BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_KNOWN) { - return ConstClockSnapshot {libObjPtr}; + return libObjPtr; } - return nonstd::nullopt; + return {}; } Shared shared() const noexcept @@ -458,17 +476,14 @@ template class CommonPacketBeginningMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; - - using _Packet = - typename std::conditional::value, CommonPacket, - CommonPacket>::type; + using _Packet = internal::DepPacket; public: - using Shared = internal::SharedMessage, LibObjT>; + using typename CommonMessage::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonPacketBeginningMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonPacketBeginningMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isPacketBeginning()); @@ -481,30 +496,37 @@ public: } template - CommonPacketBeginningMessage& + CommonPacketBeginningMessage operator=(const CommonPacketBeginningMessage val) noexcept { _ThisCommonMessage::operator=(val); return *this; } - ConstPacket packet() const noexcept + CommonPacketBeginningMessage asConst() const noexcept { - return ConstPacket {internal::CommonPacketBeginningMessageSpec::packet( - this->libObjPtr())}; + return CommonPacketBeginningMessage {*this}; } - _Packet packet() noexcept + _Packet packet() const noexcept { return _Packet { internal::CommonPacketBeginningMessageSpec::packet(this->libObjPtr())}; } - void defaultClockSnapshot(const std::uint64_t val) noexcept + OptionalBorrowedObject streamClassDefaultClockClass() const noexcept { - static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); + return bt_message_packet_beginning_borrow_stream_class_default_clock_class_const( + this->libObjPtr()); + } + + CommonPacketBeginningMessage defaultClockSnapshot(const std::uint64_t val) const noexcept + { + static_assert(!std::is_const::value, + "Not available with `bt2::ConstPacketBeginningMessage`."); bt_message_packet_beginning_set_default_clock_snapshot(this->libObjPtr(), val); + return *this; } ConstClockSnapshot defaultClockSnapshot() const noexcept @@ -571,17 +593,14 @@ template class CommonPacketEndMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; - - using _Packet = - typename std::conditional::value, CommonPacket, - CommonPacket>::type; + using _Packet = internal::DepPacket; public: - using Shared = internal::SharedMessage, LibObjT>; + using typename CommonMessage::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonPacketEndMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonPacketEndMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isPacketEnd()); @@ -594,29 +613,36 @@ public: } template - CommonPacketEndMessage& + CommonPacketEndMessage operator=(const CommonPacketEndMessage val) noexcept { _ThisCommonMessage::operator=(val); return *this; } - ConstPacket packet() const noexcept + CommonPacketEndMessage asConst() const noexcept { - return ConstPacket { - internal::CommonPacketEndMessageSpec::packet(this->libObjPtr())}; + return CommonPacketEndMessage {*this}; } - _Packet packet() noexcept + _Packet packet() const noexcept { return _Packet {internal::CommonPacketEndMessageSpec::packet(this->libObjPtr())}; } - void defaultClockSnapshot(const std::uint64_t val) noexcept + OptionalBorrowedObject streamClassDefaultClockClass() const noexcept + { + return bt_message_packet_end_borrow_stream_class_default_clock_class_const( + this->libObjPtr()); + } + + CommonPacketEndMessage defaultClockSnapshot(const std::uint64_t val) const noexcept { - static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); + static_assert(!std::is_const::value, + "Not available with `bt2::ConstPacketEndMessage`."); bt_message_packet_end_set_default_clock_snapshot(this->libObjPtr(), val); + return *this; } ConstClockSnapshot defaultClockSnapshot() const noexcept @@ -683,18 +709,14 @@ template class CommonEventMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; - - using _Event = - typename std::conditional::value, CommonEvent, - CommonEvent>::type; + using _Event = internal::DepType, CommonEvent>; public: - using Shared = internal::SharedMessage, LibObjT>; + using typename CommonMessage::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonEventMessage(const _LibObjPtr libObjPtr) noexcept : - _ThisCommonMessage {libObjPtr} + explicit CommonEventMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isEvent()); } @@ -706,23 +728,27 @@ public: } template - CommonEventMessage& operator=(const CommonEventMessage val) noexcept + CommonEventMessage operator=(const CommonEventMessage val) noexcept { _ThisCommonMessage::operator=(val); return *this; } - ConstEvent event() const noexcept + CommonEventMessage asConst() const noexcept { - return ConstEvent { - internal::CommonEventMessageSpec::event(this->libObjPtr())}; + return CommonEventMessage {*this}; } - _Event event() noexcept + _Event event() const noexcept { return _Event {internal::CommonEventMessageSpec::event(this->libObjPtr())}; } + OptionalBorrowedObject streamClassDefaultClockClass() const noexcept + { + return bt_message_event_borrow_stream_class_default_clock_class_const(this->libObjPtr()); + } + ConstClockSnapshot defaultClockSnapshot() const noexcept { const auto libObjPtr = @@ -787,17 +813,14 @@ template class CommonDiscardedEventsMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; - - using _Stream = - typename std::conditional::value, CommonStream, - CommonStream>::type; + using _Stream = internal::DepStream; public: - using Shared = internal::SharedMessage, LibObjT>; + using typename CommonMessage::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonDiscardedEventsMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonDiscardedEventsMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isDiscardedEvents()); @@ -810,25 +833,30 @@ public: } template - CommonDiscardedEventsMessage& + CommonDiscardedEventsMessage operator=(const CommonDiscardedEventsMessage val) noexcept { _ThisCommonMessage::operator=(val); return *this; } - ConstStream stream() const noexcept + CommonDiscardedEventsMessage asConst() const noexcept { - return ConstStream {internal::CommonDiscardedEventsMessageSpec::stream( - this->libObjPtr())}; + return CommonDiscardedEventsMessage {*this}; } - _Stream stream() noexcept + _Stream stream() const noexcept { return _Stream { internal::CommonDiscardedEventsMessageSpec::stream(this->libObjPtr())}; } + OptionalBorrowedObject streamClassDefaultClockClass() const noexcept + { + return bt_message_discarded_events_borrow_stream_class_default_clock_class_const( + this->libObjPtr()); + } + ConstClockSnapshot beginningDefaultClockSnapshot() const noexcept { const auto libObjPtr = @@ -846,23 +874,24 @@ public: return ConstClockSnapshot {libObjPtr}; } - void count(const std::uint64_t count) noexcept + CommonDiscardedEventsMessage count(const std::uint64_t count) const noexcept { - static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); + static_assert(!std::is_const::value, + "Not available with `bt2::ConstDiscardedEventsMessage`."); bt_message_discarded_events_set_count(this->libObjPtr(), count); + return *this; } - nonstd::optional count() const noexcept + bt2s::optional count() const noexcept { std::uint64_t count; - const auto avail = bt_message_discarded_events_get_count(this->libObjPtr(), &count); - if (avail) { + if (bt_message_discarded_events_get_count(this->libObjPtr(), &count)) { return count; } - return nonstd::nullopt; + return bt2s::nullopt; } Shared shared() const noexcept @@ -921,17 +950,14 @@ template class CommonDiscardedPacketsMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; - - using _Stream = - typename std::conditional::value, CommonStream, - CommonStream>::type; + using _Stream = internal::DepStream; public: - using Shared = internal::SharedMessage, LibObjT>; + using typename CommonMessage::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonDiscardedPacketsMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonDiscardedPacketsMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isDiscardedPackets()); @@ -944,25 +970,30 @@ public: } template - CommonDiscardedPacketsMessage& + CommonDiscardedPacketsMessage operator=(const CommonDiscardedPacketsMessage val) noexcept { _ThisCommonMessage::operator=(val); return *this; } - ConstStream stream() const noexcept + CommonDiscardedPacketsMessage asConst() const noexcept { - return ConstStream {internal::CommonDiscardedPacketsMessageSpec::stream( - this->libObjPtr())}; + return CommonDiscardedPacketsMessage {*this}; } - _Stream stream() noexcept + _Stream stream() const noexcept { return _Stream { internal::CommonDiscardedPacketsMessageSpec::stream(this->libObjPtr())}; } + OptionalBorrowedObject streamClassDefaultClockClass() const noexcept + { + return bt_message_discarded_packets_borrow_stream_class_default_clock_class_const( + this->libObjPtr()); + } + ConstClockSnapshot beginningDefaultClockSnapshot() const noexcept { const auto libObjPtr = @@ -980,23 +1011,24 @@ public: return ConstClockSnapshot {libObjPtr}; } - void count(const std::uint64_t count) noexcept + CommonDiscardedPacketsMessage count(const std::uint64_t count) const noexcept { - static_assert(!std::is_const::value, "`LibObjT` must NOT be `const`."); + static_assert(!std::is_const::value, + "Not available with `bt2::ConstDiscardedPacketsMessage`."); bt_message_discarded_packets_set_count(this->libObjPtr(), count); + return *this; } - nonstd::optional count() const noexcept + bt2s::optional count() const noexcept { std::uint64_t count; - const auto avail = bt_message_discarded_packets_get_count(this->libObjPtr(), &count); - if (avail) { + if (bt_message_discarded_packets_get_count(this->libObjPtr(), &count)) { return count; } - return nonstd::nullopt; + return bt2s::nullopt; } Shared shared() const noexcept @@ -1032,14 +1064,13 @@ template class CommonMessageIteratorInactivityMessage final : public CommonMessage { private: - using typename CommonMessage::_LibObjPtr; using typename CommonMessage::_ThisCommonMessage; public: - using Shared = - internal::SharedMessage, LibObjT>; + using typename CommonMessage::LibObjPtr; + using Shared = SharedMessage, LibObjT>; - explicit CommonMessageIteratorInactivityMessage(const _LibObjPtr libObjPtr) noexcept : + explicit CommonMessageIteratorInactivityMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr} { BT_ASSERT_DBG(this->isMessageIteratorInactivity()); @@ -1053,13 +1084,18 @@ public: } template - CommonMessageIteratorInactivityMessage& + CommonMessageIteratorInactivityMessage operator=(const CommonMessageIteratorInactivityMessage val) noexcept { _ThisCommonMessage::operator=(val); return *this; } + CommonMessageIteratorInactivityMessage asConst() const noexcept + { + return CommonMessageIteratorInactivityMessage {*this}; + } + ConstClockSnapshot clockSnapshot() const noexcept { const auto libObjPtr = @@ -1103,49 +1139,42 @@ struct TypeDescr : template CommonStreamBeginningMessage CommonMessage::asStreamBeginning() const noexcept { - BT_ASSERT_DBG(this->isStreamBeginning()); return CommonStreamBeginningMessage {this->libObjPtr()}; } template CommonStreamEndMessage CommonMessage::asStreamEnd() const noexcept { - BT_ASSERT_DBG(this->isStreamEnd()); return CommonStreamEndMessage {this->libObjPtr()}; } template CommonPacketBeginningMessage CommonMessage::asPacketBeginning() const noexcept { - BT_ASSERT_DBG(this->isPacketBeginning()); return CommonPacketBeginningMessage {this->libObjPtr()}; } template CommonPacketEndMessage CommonMessage::asPacketEnd() const noexcept { - BT_ASSERT_DBG(this->isPacketEnd()); return CommonPacketEndMessage {this->libObjPtr()}; } template CommonEventMessage CommonMessage::asEvent() const noexcept { - BT_ASSERT_DBG(this->isEvent()); return CommonEventMessage {this->libObjPtr()}; } template CommonDiscardedEventsMessage CommonMessage::asDiscardedEvents() const noexcept { - BT_ASSERT_DBG(this->isDiscardedEvents()); return CommonDiscardedEventsMessage {this->libObjPtr()}; } template CommonDiscardedPacketsMessage CommonMessage::asDiscardedPackets() const noexcept { - BT_ASSERT_DBG(this->isDiscardedPackets()); return CommonDiscardedPacketsMessage {this->libObjPtr()}; } @@ -1153,7 +1182,6 @@ template CommonMessageIteratorInactivityMessage CommonMessage::asMessageIteratorInactivity() const noexcept { - BT_ASSERT_DBG(this->isMessageIteratorInactivity()); return CommonMessageIteratorInactivityMessage {this->libObjPtr()}; }