From: Simon Marchi Date: Tue, 12 Mar 2024 22:13:56 +0000 (-0400) Subject: cpp-common/bt2: add `wrap(bt_graph *)` X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=0f286fd6b070f5f3de2f6d95865a547574f5cb3e;p=babeltrace.git 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 --- 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};