Normalize C/C++ include guards
[babeltrace.git] / src / cpp-common / bt2 / component-class-dev.hpp
index e08314a058e71e981a5dc00b6767fd7fc3b31ce4..e0d45d6b7e20f0347dbbba67c473ee60f2a504e0 100644 (file)
@@ -131,7 +131,7 @@ public:
     }
 
     static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
-                                        const ConstValue params, const LoggingLevel loggingLevel,
+                                        const ConstMapValue params, const LoggingLevel loggingLevel,
                                         const UnsignedIntegerRangeSet ranges)
     {
         UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
@@ -152,7 +152,7 @@ protected:
     }
 
     /* Overloadable */
-    static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+    static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
                                          const UnsignedIntegerRangeSet ranges)
     {
         ranges.addRange(0, 0);
@@ -235,7 +235,7 @@ public:
     }
 
     static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
-                                        const ConstValue params, const LoggingLevel loggingLevel,
+                                        const ConstMapValue params, const LoggingLevel loggingLevel,
                                         const UnsignedIntegerRangeSet ranges)
     {
         UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
@@ -262,7 +262,7 @@ protected:
     }
 
     /* Overloadable */
-    static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+    static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
                                          const UnsignedIntegerRangeSet ranges)
     {
         ranges.addRange(0, 0);
@@ -362,7 +362,7 @@ public:
     }
 
     static void getSupportedMipVersions(const SelfComponentClass selfCompCls,
-                                        const ConstValue params, const LoggingLevel loggingLevel,
+                                        const ConstMapValue params, const LoggingLevel loggingLevel,
                                         const UnsignedIntegerRangeSet ranges)
     {
         UserComponentT::_getSupportedMipVersions(selfCompCls, params, loggingLevel, ranges);
@@ -393,7 +393,7 @@ protected:
     }
 
     /* Overloadable */
-    static void _getSupportedMipVersions(SelfComponentClass, ConstValue, LoggingLevel,
+    static void _getSupportedMipVersions(SelfComponentClass, ConstMapValue, LoggingLevel,
                                          const UnsignedIntegerRangeSet ranges)
     {
         ranges.addRange(0, 0);
@@ -471,9 +471,9 @@ private:
     /* Type of `_mExcToThrowType` */
     enum class _ExcToThrowType
     {
-        NONE,
-        ERROR,
-        MEM_ERROR,
+        None,
+        Error,
+        MemError,
     };
 
 protected:
@@ -486,21 +486,21 @@ protected:
     }
 
 public:
-    void next(bt2::ConstMessageArray& messages)
+    void next(ConstMessageArray& messages)
     {
         /* Any saved error? Now is the time to throw */
-        if (G_UNLIKELY(_mExcToThrowType != _ExcToThrowType::NONE)) {
+        if (G_UNLIKELY(_mExcToThrowType != _ExcToThrowType::None)) {
             /* Move `_mSavedLibError`, if any, as current thread error */
             if (_mSavedLibError) {
                 bt_current_thread_move_error(_mSavedLibError.release());
             }
 
             /* Throw the corresponding exception */
-            if (_mExcToThrowType == _ExcToThrowType::ERROR) {
-                throw bt2::Error {};
+            if (_mExcToThrowType == _ExcToThrowType::Error) {
+                throw Error {};
             } else {
-                BT_ASSERT(_mExcToThrowType == _ExcToThrowType::MEM_ERROR);
-                throw bt2::MemoryError {};
+                BT_ASSERT(_mExcToThrowType == _ExcToThrowType::MemError);
+                throw MemoryError {};
             }
         }
 
@@ -513,14 +513,14 @@ public:
          * if any, so that we can restore it later (see the beginning of
          * this method).
          */
-        BT_ASSERT_DBG(_mExcToThrowType == _ExcToThrowType::NONE);
+        BT_ASSERT_DBG(_mExcToThrowType == _ExcToThrowType::None);
 
         try {
             this->_userObj()._next(messages);
 
             /* We're done: everything below is exception handling */
             return;
-        } catch (const bt2::TryAgain&) {
+        } catch (const TryAgain&) {
             if (messages.isEmpty()) {
                 throw;
             }
@@ -529,16 +529,16 @@ public:
                 throw;
             }
 
-            _mExcToThrowType = _ExcToThrowType::MEM_ERROR;
-        } catch (const bt2::Error&) {
+            _mExcToThrowType = _ExcToThrowType::MemError;
+        } catch (const Error&) {
             if (messages.isEmpty()) {
                 throw;
             }
 
-            _mExcToThrowType = _ExcToThrowType::ERROR;
+            _mExcToThrowType = _ExcToThrowType::Error;
         }
 
-        if (_mExcToThrowType != _ExcToThrowType::NONE) {
+        if (_mExcToThrowType != _ExcToThrowType::None) {
             BT_CPPLOGE(
                 "An error occurred, but there are {} messages to return: delaying the error reporting.",
                 messages.length());
@@ -599,6 +599,100 @@ protected:
         return _mSelfMsgIter.createMessageIterator(port);
     }
 
+    StreamBeginningMessage::Shared _createStreamBeginningMessage(const ConstStream stream) const
+    {
+        return _mSelfMsgIter.createStreamBeginningMessage(stream);
+    }
+
+    StreamEndMessage::Shared _createStreamEndMessage(const ConstStream stream) const
+    {
+        return _mSelfMsgIter.createStreamEndMessage(stream);
+    }
+
+    EventMessage::Shared _createEventMessage(const ConstEventClass eventCls,
+                                             const ConstStream stream) const
+    {
+        return _mSelfMsgIter.createEventMessage(eventCls, stream);
+    }
+
+    EventMessage::Shared _createEventMessage(const ConstEventClass eventCls,
+                                             const ConstStream stream,
+                                             const std::uint64_t clockSnapshotValue) const
+    {
+        return _mSelfMsgIter.createEventMessage(eventCls, stream, clockSnapshotValue);
+    }
+
+    EventMessage::Shared _createEventMessage(const ConstEventClass eventCls,
+                                             const ConstPacket packet) const
+    {
+        return _mSelfMsgIter.createEventMessage(eventCls, packet);
+    }
+
+    EventMessage::Shared _createEventMessage(const ConstEventClass eventCls,
+                                             const ConstPacket packet,
+                                             const std::uint64_t clockSnapshotValue) const
+    {
+        return _mSelfMsgIter.createEventMessage(eventCls, packet, clockSnapshotValue);
+    }
+
+    PacketBeginningMessage::Shared _createPacketBeginningMessage(const ConstPacket packet) const
+    {
+        return _mSelfMsgIter.createPacketBeginningMessage(packet);
+    }
+
+    PacketBeginningMessage::Shared
+    _createPacketBeginningMessage(const ConstPacket packet,
+                                  const std::uint64_t clockSnapshotValue) const
+    {
+        return _mSelfMsgIter.createPacketBeginningMessage(packet, clockSnapshotValue);
+    }
+
+    PacketEndMessage::Shared _createPacketEndMessage(const ConstPacket packet) const
+    {
+        return _mSelfMsgIter.createPacketEndMessage(packet);
+    }
+
+    PacketEndMessage::Shared _createPacketEndMessage(const ConstPacket packet,
+                                                     const std::uint64_t clockSnapshotValue) const
+    {
+        return _mSelfMsgIter.createPacketEndMessage(packet, clockSnapshotValue);
+    }
+
+    DiscardedEventsMessage::Shared _createDiscardedEventsMessage(const ConstStream stream)
+    {
+        return _mSelfMsgIter.createDiscardedEventsMessage(stream);
+    }
+
+    DiscardedEventsMessage::Shared
+    _createDiscardedEventsMessage(const ConstStream stream,
+                                  const std::uint64_t beginningClockSnapshotValue,
+                                  const std::uint64_t endClockSnapshotValue)
+    {
+        return _mSelfMsgIter.createDiscardedEventsMessage(stream, beginningClockSnapshotValue,
+                                                          endClockSnapshotValue);
+    }
+
+    DiscardedPacketsMessage::Shared _createDiscardedPacketsMessage(const ConstStream stream)
+    {
+        return _mSelfMsgIter.createDiscardedPacketsMessage(stream);
+    }
+
+    DiscardedPacketsMessage::Shared
+    _createDiscardedPacketsMessage(const ConstStream stream,
+                                   const std::uint64_t beginningClockSnapshotValue,
+                                   const std::uint64_t endClockSnapshotValue)
+    {
+        return _mSelfMsgIter.createDiscardedPacketsMessage(stream, beginningClockSnapshotValue,
+                                                           endClockSnapshotValue);
+    }
+
+    MessageIteratorInactivityMessage::Shared
+    _createMessageIteratorInactivityMessage(const ConstClockClass clockClass,
+                                            const std::uint64_t clockSnapshotValue)
+    {
+        return _mSelfMsgIter.createMessageIteratorInactivityMessage(clockClass, clockSnapshotValue);
+    }
+
     UserComponentT& _component() noexcept
     {
         return _mSelfMsgIter.component().template data<UserComponentT>();
@@ -622,7 +716,7 @@ private:
 
     void _resetError() noexcept
     {
-        _mExcToThrowType = _ExcToThrowType::NONE;
+        _mExcToThrowType = _ExcToThrowType::None;
         _mSavedLibError.reset();
     }
 
@@ -636,7 +730,7 @@ private:
      *
      * It also saves the type of the exception to throw the next time.
      */
-    _ExcToThrowType _mExcToThrowType = _ExcToThrowType::NONE;
+    _ExcToThrowType _mExcToThrowType = _ExcToThrowType::None;
 
     struct LibErrorDeleter final
     {
This page took 0.029923 seconds and 4 git commands to generate.