From 0f286fd6b070f5f3de2f6d95865a547574f5cb3e Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 12 Mar 2024 18:13:56 -0400 Subject: [PATCH] cpp-common/bt2: add `wrap(bt_graph *)` Change-Id: I85e6e38576d71f64a7cd8cb0139104bce98aac36 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/12046 Reviewed-by: Philippe Proulx Tested-by: jenkins --- src/cpp-common/bt2/wrap.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cpp-common/bt2/wrap.hpp b/src/cpp-common/bt2/wrap.hpp index 2d745154..3b8a86f8 100644 --- a/src/cpp-common/bt2/wrap.hpp +++ b/src/cpp-common/bt2/wrap.hpp @@ -14,6 +14,7 @@ #include "component-port.hpp" #include "field-class.hpp" #include "field.hpp" +#include "graph.hpp" #include "integer-range-set.hpp" #include "integer-range.hpp" #include "message-iterator.hpp" @@ -29,6 +30,11 @@ namespace bt2 { +inline Graph wrap(bt_graph * const libObjPtr) noexcept +{ + return Graph {libObjPtr}; +} + inline ClockClass wrap(bt_clock_class * const libObjPtr) noexcept { return ClockClass {libObjPtr}; -- 2.34.1