Change naming convention for enum class enumerators
[babeltrace.git] / src / cpp-common / bt2 / message.hpp
index 0abd3c5403e0fc69ef539c1df9b63f9e6ea68b3e..93f8acd61ee311dfff485976007612b58b012418 100644 (file)
@@ -70,14 +70,14 @@ 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,
+    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,
 };
 
 template <typename LibObjT>
@@ -121,42 +121,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
@@ -268,6 +268,12 @@ public:
             internal::CommonStreamBeginningMessageSpec<LibObjT>::stream(this->libObjPtr())};
     }
 
+    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,
@@ -383,6 +389,12 @@ public:
         return _Stream {internal::CommonStreamEndMessageSpec<LibObjT>::stream(this->libObjPtr())};
     }
 
+    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,
@@ -499,6 +511,12 @@ public:
             internal::CommonPacketBeginningMessageSpec<LibObjT>::packet(this->libObjPtr())};
     }
 
+    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,
@@ -609,6 +627,12 @@ public:
         return _Packet {internal::CommonPacketEndMessageSpec<LibObjT>::packet(this->libObjPtr())};
     }
 
+    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,
@@ -824,6 +848,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 =
@@ -955,6 +985,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 =
This page took 0.026198 seconds and 4 git commands to generate.