cpp-common/bt2: add shared() methods on component classes
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 31 May 2024 20:08:00 +0000 (16:08 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
Change-Id: I5d2e264904bb54b65a41fb0dfe653fb7eb3e54b2
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12838
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins <jenkins@lttng.org>
src/cpp-common/bt2/component-class.hpp

index 2933d74f737fd6d6e56d13f672549029579cd8f6..bd761461f061a13f0ebe851ad957e969fa548ea1 100644 (file)
@@ -205,6 +205,11 @@ public:
         return this->_constComponentClass().help();
     }
 
+    Shared shared() const noexcept
+    {
+        return Shared::createWithRef(*this);
+    }
+
 private:
     ConstComponentClass _constComponentClass() const noexcept
     {
@@ -316,6 +321,11 @@ public:
         return this->_constComponentClass().help();
     }
 
+    Shared shared() const noexcept
+    {
+        return Shared::createWithRef(*this);
+    }
+
 private:
     ConstComponentClass _constComponentClass() const noexcept
     {
@@ -427,6 +437,11 @@ public:
         return this->_constComponentClass().help();
     }
 
+    Shared shared() const noexcept
+    {
+        return Shared::createWithRef(*this);
+    }
+
 private:
     ConstComponentClass _constComponentClass() const noexcept
     {
This page took 0.024822 seconds and 4 git commands to generate.