cpp-common/bt2: add `bt2::SelfMessageIteratorConfiguration`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 6 Nov 2023 19:23:17 +0000 (14:23 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 14 Dec 2023 15:57:04 +0000 (10:57 -0500)
A very straightforward wrapper of
`bt_self_message_iterator_configuration`.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I0a31ee1feb1eefc7f6de3d87a4f43963d75b3274
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11272
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
src/Makefile.am
src/cpp-common/bt2/self-message-iterator-configuration.hpp [new file with mode: 0644]

index ec1a473d675289478398c7d2028011e60318a78b..6f8b3ee8eafb79668efa12790af45848047edcaa 100644 (file)
@@ -32,6 +32,7 @@ noinst_HEADERS = \
        cpp-common/bt2/shared-object.hpp \
        cpp-common/bt2/raw-value-proxy.hpp \
        cpp-common/bt2/self-component-port.hpp \
        cpp-common/bt2/shared-object.hpp \
        cpp-common/bt2/raw-value-proxy.hpp \
        cpp-common/bt2/self-component-port.hpp \
+       cpp-common/bt2/self-message-iterator-configuration.hpp \
        cpp-common/bt2/self-message-iterator.hpp \
        cpp-common/bt2/trace-ir.hpp \
        cpp-common/bt2/type-traits.hpp \
        cpp-common/bt2/self-message-iterator.hpp \
        cpp-common/bt2/trace-ir.hpp \
        cpp-common/bt2/type-traits.hpp \
diff --git a/src/cpp-common/bt2/self-message-iterator-configuration.hpp b/src/cpp-common/bt2/self-message-iterator-configuration.hpp
new file mode 100644 (file)
index 0000000..5ae3672
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2023 Philippe Proulx <pproulx@efficios.com>
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#ifndef BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP
+#define BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP
+
+#include <babeltrace2/babeltrace.h>
+
+#include "borrowed-object.hpp"
+
+namespace bt2 {
+
+class SelfMessageIteratorConfiguration final :
+    public BorrowedObject<bt_self_message_iterator_configuration>
+{
+public:
+    explicit SelfMessageIteratorConfiguration(const _LibObjPtr libObjPtr) noexcept :
+        _ThisBorrowedObject {libObjPtr}
+    {
+    }
+
+    void canSeekForward(const bool canSeekForward) const noexcept
+    {
+        bt_self_message_iterator_configuration_set_can_seek_forward(
+            this->libObjPtr(), static_cast<bt_bool>(canSeekForward));
+    }
+};
+
+} /* namespace bt2 */
+
+#endif /* BABELTRACE_CPP_COMMON_BT2_SELF_MESSAGE_ITERATOR_CONFIGURATION_HPP */
This page took 0.026424 seconds and 4 git commands to generate.