doc/api/libbabeltrace2/DoxygenLayout.xml: use `topics` tab
[babeltrace.git] / src / cpp-common / bt2 / message.hpp
index b3a6355beca4b9f9fadcb927fd9e609bf74348c1..77321778ad0394e6e81482400219a8f0731524e5 100644 (file)
 #include "common/assert.h"
 #include "cpp-common/bt2/clock-snapshot.hpp"
 #include "cpp-common/bt2/trace-ir.hpp"
-#include "cpp-common/optional.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 "optional-borrowed-object.hpp"
 #include "shared-object.hpp"
+#include "trace-ir.hpp"
 
 namespace bt2 {
 namespace internal {
@@ -66,17 +69,19 @@ class CommonDiscardedPacketsMessage;
 template <typename LibObjT>
 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 <typename LibObjT>
 class CommonMessage : public BorrowedObject<LibObjT>
@@ -85,13 +90,13 @@ private:
     using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
 
 protected:
-    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ThisCommonMessage = CommonMessage<LibObjT>;
 
 public:
+    using typename BorrowedObject<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonMessage<LibObjT>, LibObjT>;
 
-    explicit CommonMessage(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
+    explicit CommonMessage(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
@@ -101,7 +106,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    _ThisCommonMessage& operator=(const CommonMessage<OtherLibObjT> val) noexcept
+    _ThisCommonMessage operator=(const CommonMessage<OtherLibObjT> val) noexcept
     {
         _ThisBorrowedObject::operator=(val);
         return *this;
@@ -119,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
@@ -228,17 +233,14 @@ template <typename LibObjT>
 class CommonStreamBeginningMessage final : public CommonMessage<LibObjT>
 {
 private:
-    using typename CommonMessage<LibObjT>::_LibObjPtr;
     using typename CommonMessage<LibObjT>::_ThisCommonMessage;
-
-    using _Stream =
-        typename std::conditional<std::is_const<LibObjT>::value, CommonStream<const bt_stream>,
-                                  CommonStream<bt_stream>>::type;
+    using _Stream = internal::DepStream<LibObjT>;
 
 public:
+    using typename CommonMessage<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonStreamBeginningMessage<LibObjT>, LibObjT>;
 
-    explicit CommonStreamBeginningMessage(const _LibObjPtr libObjPtr) noexcept :
+    explicit CommonStreamBeginningMessage(const LibObjPtr libObjPtr) noexcept :
         _ThisCommonMessage {libObjPtr}
     {
         BT_ASSERT_DBG(this->isStreamBeginning());
@@ -251,7 +253,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonStreamBeginningMessage<LibObjT>&
+    CommonStreamBeginningMessage<LibObjT>
     operator=(const CommonStreamBeginningMessage<OtherLibObjT> val) noexcept
     {
         _ThisCommonMessage::operator=(val);
@@ -269,25 +271,32 @@ public:
             internal::CommonStreamBeginningMessageSpec<LibObjT>::stream(this->libObjPtr())};
     }
 
-    void defaultClockSnapshot(const std::uint64_t val) const noexcept
+    OptionalBorrowedObject<ConstClockClass> streamClassDefaultClockClass() const noexcept
+    {
+        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<LibObjT>::value,
                       "Not available with `bt2::ConstStreamBeginningMessage`.");
 
         bt_message_stream_beginning_set_default_clock_snapshot(this->libObjPtr(), val);
+        return *this;
     }
 
-    nonstd::optional<ConstClockSnapshot> defaultClockSnapshot() const noexcept
+    OptionalBorrowedObject<ConstClockSnapshot> 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
@@ -346,17 +355,14 @@ template <typename LibObjT>
 class CommonStreamEndMessage final : public CommonMessage<LibObjT>
 {
 private:
-    using typename CommonMessage<LibObjT>::_LibObjPtr;
     using typename CommonMessage<LibObjT>::_ThisCommonMessage;
-
-    using _Stream =
-        typename std::conditional<std::is_const<LibObjT>::value, CommonStream<const bt_stream>,
-                                  CommonStream<bt_stream>>::type;
+    using _Stream = internal::DepStream<LibObjT>;
 
 public:
+    using typename CommonMessage<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonStreamEndMessage<LibObjT>, LibObjT>;
 
-    explicit CommonStreamEndMessage(const _LibObjPtr libObjPtr) noexcept :
+    explicit CommonStreamEndMessage(const LibObjPtr libObjPtr) noexcept :
         _ThisCommonMessage {libObjPtr}
     {
         BT_ASSERT_DBG(this->isStreamEnd());
@@ -369,7 +375,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonStreamEndMessage<LibObjT>&
+    CommonStreamEndMessage<LibObjT>
     operator=(const CommonStreamEndMessage<OtherLibObjT> val) noexcept
     {
         _ThisCommonMessage::operator=(val);
@@ -386,25 +392,32 @@ public:
         return _Stream {internal::CommonStreamEndMessageSpec<LibObjT>::stream(this->libObjPtr())};
     }
 
-    void defaultClockSnapshot(const std::uint64_t val) const noexcept
+    OptionalBorrowedObject<ConstClockClass> streamClassDefaultClockClass() const noexcept
+    {
+        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<LibObjT>::value,
                       "Not available with `bt2::ConstStreamEndMessage`.");
 
         bt_message_stream_end_set_default_clock_snapshot(this->libObjPtr(), val);
+        return *this;
     }
 
-    nonstd::optional<ConstClockSnapshot> defaultClockSnapshot() const noexcept
+    OptionalBorrowedObject<ConstClockSnapshot> 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
@@ -463,17 +476,14 @@ template <typename LibObjT>
 class CommonPacketBeginningMessage final : public CommonMessage<LibObjT>
 {
 private:
-    using typename CommonMessage<LibObjT>::_LibObjPtr;
     using typename CommonMessage<LibObjT>::_ThisCommonMessage;
-
-    using _Packet =
-        typename std::conditional<std::is_const<LibObjT>::value, CommonPacket<const bt_packet>,
-                                  CommonPacket<bt_packet>>::type;
+    using _Packet = internal::DepPacket<LibObjT>;
 
 public:
+    using typename CommonMessage<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonPacketBeginningMessage<LibObjT>, LibObjT>;
 
-    explicit CommonPacketBeginningMessage(const _LibObjPtr libObjPtr) noexcept :
+    explicit CommonPacketBeginningMessage(const LibObjPtr libObjPtr) noexcept :
         _ThisCommonMessage {libObjPtr}
     {
         BT_ASSERT_DBG(this->isPacketBeginning());
@@ -486,7 +496,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonPacketBeginningMessage<LibObjT>&
+    CommonPacketBeginningMessage<LibObjT>
     operator=(const CommonPacketBeginningMessage<OtherLibObjT> val) noexcept
     {
         _ThisCommonMessage::operator=(val);
@@ -504,12 +514,19 @@ public:
             internal::CommonPacketBeginningMessageSpec<LibObjT>::packet(this->libObjPtr())};
     }
 
-    void defaultClockSnapshot(const std::uint64_t val) const noexcept
+    OptionalBorrowedObject<ConstClockClass> streamClassDefaultClockClass() const noexcept
+    {
+        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<LibObjT>::value,
                       "Not available with `bt2::ConstPacketBeginningMessage`.");
 
         bt_message_packet_beginning_set_default_clock_snapshot(this->libObjPtr(), val);
+        return *this;
     }
 
     ConstClockSnapshot defaultClockSnapshot() const noexcept
@@ -576,17 +593,14 @@ template <typename LibObjT>
 class CommonPacketEndMessage final : public CommonMessage<LibObjT>
 {
 private:
-    using typename CommonMessage<LibObjT>::_LibObjPtr;
     using typename CommonMessage<LibObjT>::_ThisCommonMessage;
-
-    using _Packet =
-        typename std::conditional<std::is_const<LibObjT>::value, CommonPacket<const bt_packet>,
-                                  CommonPacket<bt_packet>>::type;
+    using _Packet = internal::DepPacket<LibObjT>;
 
 public:
+    using typename CommonMessage<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonPacketEndMessage<LibObjT>, LibObjT>;
 
-    explicit CommonPacketEndMessage(const _LibObjPtr libObjPtr) noexcept :
+    explicit CommonPacketEndMessage(const LibObjPtr libObjPtr) noexcept :
         _ThisCommonMessage {libObjPtr}
     {
         BT_ASSERT_DBG(this->isPacketEnd());
@@ -599,7 +613,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonPacketEndMessage<LibObjT>&
+    CommonPacketEndMessage<LibObjT>
     operator=(const CommonPacketEndMessage<OtherLibObjT> val) noexcept
     {
         _ThisCommonMessage::operator=(val);
@@ -616,12 +630,19 @@ public:
         return _Packet {internal::CommonPacketEndMessageSpec<LibObjT>::packet(this->libObjPtr())};
     }
 
-    void defaultClockSnapshot(const std::uint64_t val) const noexcept
+    OptionalBorrowedObject<ConstClockClass> 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<LibObjT>::value,
                       "Not available with `bt2::ConstPacketEndMessage`.");
 
         bt_message_packet_end_set_default_clock_snapshot(this->libObjPtr(), val);
+        return *this;
     }
 
     ConstClockSnapshot defaultClockSnapshot() const noexcept
@@ -688,18 +709,14 @@ template <typename LibObjT>
 class CommonEventMessage final : public CommonMessage<LibObjT>
 {
 private:
-    using typename CommonMessage<LibObjT>::_LibObjPtr;
     using typename CommonMessage<LibObjT>::_ThisCommonMessage;
-
-    using _Event =
-        typename std::conditional<std::is_const<LibObjT>::value, CommonEvent<const bt_event>,
-                                  CommonEvent<bt_event>>::type;
+    using _Event = internal::DepType<LibObjT, CommonEvent<bt_event>, CommonEvent<const bt_event>>;
 
 public:
+    using typename CommonMessage<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonEventMessage<LibObjT>, LibObjT>;
 
-    explicit CommonEventMessage(const _LibObjPtr libObjPtr) noexcept :
-        _ThisCommonMessage {libObjPtr}
+    explicit CommonEventMessage(const LibObjPtr libObjPtr) noexcept : _ThisCommonMessage {libObjPtr}
     {
         BT_ASSERT_DBG(this->isEvent());
     }
@@ -711,7 +728,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonEventMessage<LibObjT>& operator=(const CommonEventMessage<OtherLibObjT> val) noexcept
+    CommonEventMessage<LibObjT> operator=(const CommonEventMessage<OtherLibObjT> val) noexcept
     {
         _ThisCommonMessage::operator=(val);
         return *this;
@@ -727,6 +744,11 @@ public:
         return _Event {internal::CommonEventMessageSpec<LibObjT>::event(this->libObjPtr())};
     }
 
+    OptionalBorrowedObject<ConstClockClass> streamClassDefaultClockClass() const noexcept
+    {
+        return bt_message_event_borrow_stream_class_default_clock_class_const(this->libObjPtr());
+    }
+
     ConstClockSnapshot defaultClockSnapshot() const noexcept
     {
         const auto libObjPtr =
@@ -791,17 +813,14 @@ template <typename LibObjT>
 class CommonDiscardedEventsMessage final : public CommonMessage<LibObjT>
 {
 private:
-    using typename CommonMessage<LibObjT>::_LibObjPtr;
     using typename CommonMessage<LibObjT>::_ThisCommonMessage;
-
-    using _Stream =
-        typename std::conditional<std::is_const<LibObjT>::value, CommonStream<const bt_stream>,
-                                  CommonStream<bt_stream>>::type;
+    using _Stream = internal::DepStream<LibObjT>;
 
 public:
+    using typename CommonMessage<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonDiscardedEventsMessage<LibObjT>, LibObjT>;
 
-    explicit CommonDiscardedEventsMessage(const _LibObjPtr libObjPtr) noexcept :
+    explicit CommonDiscardedEventsMessage(const LibObjPtr libObjPtr) noexcept :
         _ThisCommonMessage {libObjPtr}
     {
         BT_ASSERT_DBG(this->isDiscardedEvents());
@@ -814,7 +833,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonDiscardedEventsMessage<LibObjT>&
+    CommonDiscardedEventsMessage<LibObjT>
     operator=(const CommonDiscardedEventsMessage<OtherLibObjT> val) noexcept
     {
         _ThisCommonMessage::operator=(val);
@@ -832,6 +851,12 @@ public:
             internal::CommonDiscardedEventsMessageSpec<LibObjT>::stream(this->libObjPtr())};
     }
 
+    OptionalBorrowedObject<ConstClockClass> streamClassDefaultClockClass() const noexcept
+    {
+        return bt_message_discarded_events_borrow_stream_class_default_clock_class_const(
+            this->libObjPtr());
+    }
+
     ConstClockSnapshot beginningDefaultClockSnapshot() const noexcept
     {
         const auto libObjPtr =
@@ -849,24 +874,24 @@ public:
         return ConstClockSnapshot {libObjPtr};
     }
 
-    void count(const std::uint64_t count) const noexcept
+    CommonDiscardedEventsMessage count(const std::uint64_t count) const noexcept
     {
         static_assert(!std::is_const<LibObjT>::value,
                       "Not available with `bt2::ConstDiscardedEventsMessage`.");
 
         bt_message_discarded_events_set_count(this->libObjPtr(), count);
+        return *this;
     }
 
-    nonstd::optional<std::uint64_t> count() const noexcept
+    bt2s::optional<std::uint64_t> 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
@@ -925,17 +950,14 @@ template <typename LibObjT>
 class CommonDiscardedPacketsMessage final : public CommonMessage<LibObjT>
 {
 private:
-    using typename CommonMessage<LibObjT>::_LibObjPtr;
     using typename CommonMessage<LibObjT>::_ThisCommonMessage;
-
-    using _Stream =
-        typename std::conditional<std::is_const<LibObjT>::value, CommonStream<const bt_stream>,
-                                  CommonStream<bt_stream>>::type;
+    using _Stream = internal::DepStream<LibObjT>;
 
 public:
+    using typename CommonMessage<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonDiscardedPacketsMessage<LibObjT>, LibObjT>;
 
-    explicit CommonDiscardedPacketsMessage(const _LibObjPtr libObjPtr) noexcept :
+    explicit CommonDiscardedPacketsMessage(const LibObjPtr libObjPtr) noexcept :
         _ThisCommonMessage {libObjPtr}
     {
         BT_ASSERT_DBG(this->isDiscardedPackets());
@@ -948,7 +970,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonDiscardedPacketsMessage<LibObjT>&
+    CommonDiscardedPacketsMessage<LibObjT>
     operator=(const CommonDiscardedPacketsMessage<OtherLibObjT> val) noexcept
     {
         _ThisCommonMessage::operator=(val);
@@ -966,6 +988,12 @@ public:
             internal::CommonDiscardedPacketsMessageSpec<LibObjT>::stream(this->libObjPtr())};
     }
 
+    OptionalBorrowedObject<ConstClockClass> streamClassDefaultClockClass() const noexcept
+    {
+        return bt_message_discarded_packets_borrow_stream_class_default_clock_class_const(
+            this->libObjPtr());
+    }
+
     ConstClockSnapshot beginningDefaultClockSnapshot() const noexcept
     {
         const auto libObjPtr =
@@ -983,24 +1011,24 @@ public:
         return ConstClockSnapshot {libObjPtr};
     }
 
-    void count(const std::uint64_t count) const noexcept
+    CommonDiscardedPacketsMessage count(const std::uint64_t count) const noexcept
     {
         static_assert(!std::is_const<LibObjT>::value,
                       "Not available with `bt2::ConstDiscardedPacketsMessage`.");
 
         bt_message_discarded_packets_set_count(this->libObjPtr(), count);
+        return *this;
     }
 
-    nonstd::optional<std::uint64_t> count() const noexcept
+    bt2s::optional<std::uint64_t> 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
@@ -1036,13 +1064,13 @@ template <typename LibObjT>
 class CommonMessageIteratorInactivityMessage final : public CommonMessage<LibObjT>
 {
 private:
-    using typename CommonMessage<LibObjT>::_LibObjPtr;
     using typename CommonMessage<LibObjT>::_ThisCommonMessage;
 
 public:
+    using typename CommonMessage<LibObjT>::LibObjPtr;
     using Shared = SharedMessage<CommonMessageIteratorInactivityMessage<LibObjT>, LibObjT>;
 
-    explicit CommonMessageIteratorInactivityMessage(const _LibObjPtr libObjPtr) noexcept :
+    explicit CommonMessageIteratorInactivityMessage(const LibObjPtr libObjPtr) noexcept :
         _ThisCommonMessage {libObjPtr}
     {
         BT_ASSERT_DBG(this->isMessageIteratorInactivity());
@@ -1056,7 +1084,7 @@ public:
     }
 
     template <typename OtherLibObjT>
-    CommonMessageIteratorInactivityMessage<LibObjT>&
+    CommonMessageIteratorInactivityMessage<LibObjT>
     operator=(const CommonMessageIteratorInactivityMessage<OtherLibObjT> val) noexcept
     {
         _ThisCommonMessage::operator=(val);
@@ -1111,49 +1139,42 @@ struct TypeDescr<ConstMessageIteratorInactivityMessage> :
 template <typename LibObjT>
 CommonStreamBeginningMessage<LibObjT> CommonMessage<LibObjT>::asStreamBeginning() const noexcept
 {
-    BT_ASSERT_DBG(this->isStreamBeginning());
     return CommonStreamBeginningMessage<LibObjT> {this->libObjPtr()};
 }
 
 template <typename LibObjT>
 CommonStreamEndMessage<LibObjT> CommonMessage<LibObjT>::asStreamEnd() const noexcept
 {
-    BT_ASSERT_DBG(this->isStreamEnd());
     return CommonStreamEndMessage<LibObjT> {this->libObjPtr()};
 }
 
 template <typename LibObjT>
 CommonPacketBeginningMessage<LibObjT> CommonMessage<LibObjT>::asPacketBeginning() const noexcept
 {
-    BT_ASSERT_DBG(this->isPacketBeginning());
     return CommonPacketBeginningMessage<LibObjT> {this->libObjPtr()};
 }
 
 template <typename LibObjT>
 CommonPacketEndMessage<LibObjT> CommonMessage<LibObjT>::asPacketEnd() const noexcept
 {
-    BT_ASSERT_DBG(this->isPacketEnd());
     return CommonPacketEndMessage<LibObjT> {this->libObjPtr()};
 }
 
 template <typename LibObjT>
 CommonEventMessage<LibObjT> CommonMessage<LibObjT>::asEvent() const noexcept
 {
-    BT_ASSERT_DBG(this->isEvent());
     return CommonEventMessage<LibObjT> {this->libObjPtr()};
 }
 
 template <typename LibObjT>
 CommonDiscardedEventsMessage<LibObjT> CommonMessage<LibObjT>::asDiscardedEvents() const noexcept
 {
-    BT_ASSERT_DBG(this->isDiscardedEvents());
     return CommonDiscardedEventsMessage<LibObjT> {this->libObjPtr()};
 }
 
 template <typename LibObjT>
 CommonDiscardedPacketsMessage<LibObjT> CommonMessage<LibObjT>::asDiscardedPackets() const noexcept
 {
-    BT_ASSERT_DBG(this->isDiscardedPackets());
     return CommonDiscardedPacketsMessage<LibObjT> {this->libObjPtr()};
 }
 
@@ -1161,7 +1182,6 @@ template <typename LibObjT>
 CommonMessageIteratorInactivityMessage<LibObjT>
 CommonMessage<LibObjT>::asMessageIteratorInactivity() const noexcept
 {
-    BT_ASSERT_DBG(this->isMessageIteratorInactivity());
     return CommonMessageIteratorInactivityMessage<LibObjT> {this->libObjPtr()};
 }
 
This page took 0.034919 seconds and 4 git commands to generate.