cpp-common/bt2: make `bt2::BorrowedObject::LibObj` public
[babeltrace.git] / src / cpp-common / bt2 / borrowed-object.hpp
index 678fed824cf5af1d95d6dafa8fc306914f831b37..f3b4fdcccec34daed47bafe45a60f8bbaf1668bf 100644 (file)
@@ -70,19 +70,24 @@ private:
     };
 
 protected:
-    /* libbabeltrace2 object pointer */
-    using _LibObjPtr = LibObjT *;
-
     /* This complete borrowed object */
     using _ThisBorrowedObject = BorrowedObject<LibObjT>;
 
+public:
+    /* libbabeltrace2 object */
+    using LibObj = LibObjT;
+
+    /* libbabeltrace2 object pointer */
+    using LibObjPtr = LibObjT *;
+
+protected:
     /*
      * Builds a borrowed object to wrap the libbabeltrace2 object
      * pointer `libObjPtr`.
      *
      * `libObjPtr` must not be `nullptr`.
      */
-    explicit BorrowedObject(const _LibObjPtr libObjPtr) noexcept : _mLibObjPtr {libObjPtr}
+    explicit BorrowedObject(const LibObjPtr libObjPtr) noexcept : _mLibObjPtr {libObjPtr}
     {
         BT_ASSERT_DBG(libObjPtr);
     }
@@ -138,7 +143,7 @@ public:
      */
     std::size_t hash() const noexcept
     {
-        return std::hash<_LibObjPtr> {}(_mLibObjPtr);
+        return std::hash<LibObjPtr> {}(_mLibObjPtr);
     }
 
     /*
@@ -151,13 +156,13 @@ public:
     }
 
     /* Wrapped libbabeltrace2 object pointer */
-    _LibObjPtr libObjPtr() const noexcept
+    LibObjPtr libObjPtr() const noexcept
     {
         return _mLibObjPtr;
     }
 
 private:
-    _LibObjPtr _mLibObjPtr;
+    LibObjPtr _mLibObjPtr;
 };
 
 } /* namespace bt2 */
This page took 0.024899 seconds and 4 git commands to generate.