cpp-common/bt2: rename `bt2::BorrowedObj` -> `bt2::BorrowedObject`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 13 Nov 2023 19:15:33 +0000 (14:15 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 14 Dec 2023 15:57:04 +0000 (10:57 -0500)
This is public now, so use the full name without abbreviation like
everything else does.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I9716e1c5b60a06211f2292e71df574a2924e862f
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11366
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
13 files changed:
src/Makefile.am
src/cpp-common/bt2/borrowed-obj.hpp [deleted file]
src/cpp-common/bt2/borrowed-object.hpp [new file with mode: 0644]
src/cpp-common/bt2/clock-class.hpp
src/cpp-common/bt2/clock-snapshot.hpp
src/cpp-common/bt2/field-class.hpp
src/cpp-common/bt2/field-path.hpp
src/cpp-common/bt2/field.hpp
src/cpp-common/bt2/integer-range-set.hpp
src/cpp-common/bt2/integer-range.hpp
src/cpp-common/bt2/message.hpp
src/cpp-common/bt2/trace-ir.hpp
src/cpp-common/bt2/value.hpp

index fc890bb36a595b8f39a3f34465a6a35c8efeb04b..523274bf0319b158c202243dc6d61e3c0d2b92bc 100644 (file)
@@ -12,7 +12,7 @@ SUBDIRS += bindings/python/bt2
 endif
 
 noinst_HEADERS = \
-       cpp-common/bt2/borrowed-obj.hpp \
+       cpp-common/bt2/borrowed-object.hpp \
        cpp-common/bt2/clock-class.hpp \
        cpp-common/bt2/clock-snapshot.hpp \
        cpp-common/bt2/common-iter.hpp \
diff --git a/src/cpp-common/bt2/borrowed-obj.hpp b/src/cpp-common/bt2/borrowed-obj.hpp
deleted file mode 100644 (file)
index b006670..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright 2019-2020 (c) Philippe Proulx <pproulx@efficios.com>
- *
- * SPDX-License-Identifier: MIT
- */
-
-#ifndef BABELTRACE_CPP_COMMON_BT2_BORROWED_OBJ_HPP
-#define BABELTRACE_CPP_COMMON_BT2_BORROWED_OBJ_HPP
-
-#include <functional>
-#include <type_traits>
-
-#include "common/assert.h"
-
-namespace bt2 {
-
-/*
- * An instance of this class wraps a pointer to a libbabeltrace2 object
- * of type `LibObjT` without managing any reference counting.
- *
- * This is an abstract base class for any libbabeltrace2 object wrapper.
- *
- * `LibObjT` is the direct libbabeltrace2 object type, for example
- * `bt_stream_class` or `const bt_value`.
- *
- * Methods of a derived class can call libObjPtr() to access the
- * libbabeltrace2 object pointer.
- */
-template <typename LibObjT>
-class BorrowedObj
-{
-    static_assert(!std::is_pointer<LibObjT>::value, "`LibObjT` must not be a pointer");
-
-    /*
-     * This makes it possible for a `BorrowedObj<const bt_something>`
-     * instance to get assigned an instance of
-     * `BorrowedObj<bt_something>` ("copy" constructor and "assignment"
-     * operator).
-     *
-     * C++ forbids the other way around.
-     */
-    template <typename>
-    friend class BorrowedObj;
-
-private:
-    /*
-     * Provides `val` which indicates whether or not you can assign this
-     * object from a borrowed object of type `OtherLibObjT`.
-     */
-    template <typename OtherLibObjT>
-    struct _AssignableFromConst final
-    {
-        /*
-         * If `LibObjT` is const (for example, `const bt_value`), then
-         * you may always assign from its non-const equivalent (for
-         * example, `bt_value`). In C (correct):
-         *
-         *     bt_value * const meow = bt_value_bool_create_init(BT_TRUE);
-         *     const bt_value * const mix = meow;
-         *
-         * If `LibObjT` is non-const, then you may not assign from its
-         * const equivalent. In C (not correct):
-         *
-         *     const bt_value * const meow =
-         *         bt_value_array_borrow_element_by_index_const(some_val, 17);
-         *     bt_value * const mix = meow;
-         */
-        static constexpr bool val =
-            std::is_const<LibObjT>::value || !std::is_const<OtherLibObjT>::value;
-    };
-
-protected:
-    /* libbabeltrace2 object pointer */
-    using _LibObjPtr = LibObjT *;
-
-    /* This complete borrowed object */
-    using _ThisBorrowedObj = BorrowedObj<LibObjT>;
-
-    /*
-     * Builds a borrowed object to wrap the libbabeltrace2 object
-     * pointer `libObjPtr`.
-     *
-     * `libObjPtr` must not be `nullptr`.
-     */
-    explicit BorrowedObj(const _LibObjPtr libObjPtr) noexcept : _mLibObjPtr {libObjPtr}
-    {
-        BT_ASSERT(libObjPtr);
-    }
-
-    /* Default copy operations */
-    BorrowedObj(const BorrowedObj&) noexcept = default;
-    BorrowedObj& operator=(const BorrowedObj&) noexcept = default;
-
-    /*
-     * Generic "copy" constructor.
-     *
-     * This converting constructor accepts both an instance of
-     * `_ThisBorrowedObj` and an instance (`other`) of
-     * `BorrowedObj<ConstLibObjT>`, where `ConstLibObjT` is the `const`
-     * version of `LibObjT`, if applicable.
-     *
-     * This makes it possible for a `BorrowedObj<const bt_something>`
-     * instance to be built from an instance of
-     * `BorrowedObj<bt_something>`. C++ forbids the other way around.
-     */
-    template <typename OtherLibObjT>
-    BorrowedObj(const BorrowedObj<OtherLibObjT>& other) noexcept : BorrowedObj {other._mLibObjPtr}
-    {
-        static_assert(_AssignableFromConst<OtherLibObjT>::val,
-                      "Don't assign a non-const wrapper from a const wrapper.");
-    }
-
-    /*
-     * Generic "assignment" operator.
-     *
-     * This operator accepts both an instance of
-     * `_ThisBorrowedObj` and an instance (`other`) of
-     * `BorrowedObj<ConstLibObjT>`, where `ConstLibObjT` is the `const`
-     * version of `LibObjT`, if applicable.
-     *
-     * This makes it possible for a `BorrowedObj<const bt_something>`
-     * instance to get assigned an instance of
-     * `BorrowedObj<bt_something>`. C++ forbids the other way around,
-     * therefore we use `_EnableIfAssignableT` to show a more relevant
-     * context in the compiler error message.
-     */
-    template <typename OtherLibObjT>
-    _ThisBorrowedObj& operator=(const BorrowedObj<OtherLibObjT>& other) noexcept
-    {
-        static_assert(_AssignableFromConst<OtherLibObjT>::val,
-                      "Don't assign a non-const wrapper from a const wrapper.");
-
-        _mLibObjPtr = other._mLibObjPtr;
-        return *this;
-    }
-
-public:
-    /*
-     * Returns a hash of this object, solely based on its raw libbabeltrace2
-     * pointer.
-     */
-    std::size_t hash() const noexcept
-    {
-        return std::hash<_LibObjPtr> {}(_mLibObjPtr);
-    }
-
-    /*
-     * Returns whether or not this object is the exact same as `other`,
-     * solely based on the raw libbabeltrace2 pointers.
-     */
-    bool isSame(const _ThisBorrowedObj& other) const noexcept
-    {
-        return _mLibObjPtr == other._mLibObjPtr;
-    }
-
-    /* Wrapped libbabeltrace2 object pointer */
-    _LibObjPtr libObjPtr() const noexcept
-    {
-        return _mLibObjPtr;
-    }
-
-private:
-    _LibObjPtr _mLibObjPtr;
-};
-
-} /* namespace bt2 */
-
-#endif /* BABELTRACE_CPP_COMMON_BT2_BORROWED_OBJ_HPP */
diff --git a/src/cpp-common/bt2/borrowed-object.hpp b/src/cpp-common/bt2/borrowed-object.hpp
new file mode 100644 (file)
index 0000000..24f026e
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2019-2020 (c) Philippe Proulx <pproulx@efficios.com>
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#ifndef BABELTRACE_CPP_COMMON_BT2_BORROWED_OBJECT_HPP
+#define BABELTRACE_CPP_COMMON_BT2_BORROWED_OBJECT_HPP
+
+#include <functional>
+#include <type_traits>
+
+#include "common/assert.h"
+
+namespace bt2 {
+
+/*
+ * An instance of this class wraps a pointer to a libbabeltrace2 object
+ * of type `LibObjT` without managing any reference counting.
+ *
+ * This is an abstract base class for any libbabeltrace2 object wrapper.
+ *
+ * `LibObjT` is the direct libbabeltrace2 object type, for example
+ * `bt_stream_class` or `const bt_value`.
+ *
+ * Methods of a derived class can call libObjPtr() to access the
+ * libbabeltrace2 object pointer.
+ */
+template <typename LibObjT>
+class BorrowedObject
+{
+    static_assert(!std::is_pointer<LibObjT>::value, "`LibObjT` must not be a pointer");
+
+    /*
+     * This makes it possible for a `BorrowedObject<const bt_something>`
+     * instance to get assigned an instance of
+     * `BorrowedObject<bt_something>` ("copy" constructor and
+     * "assignment" operator).
+     *
+     * C++ forbids the other way around.
+     */
+    template <typename>
+    friend class BorrowedObject;
+
+private:
+    /*
+     * Provides `val` which indicates whether or not you can assign this
+     * object from a borrowed object of type `OtherLibObjT`.
+     */
+    template <typename OtherLibObjT>
+    struct _AssignableFromConst final
+    {
+        /*
+         * If `LibObjT` is const (for example, `const bt_value`), then
+         * you may always assign from its non-const equivalent (for
+         * example, `bt_value`). In C (correct):
+         *
+         *     bt_value * const meow = bt_value_bool_create_init(BT_TRUE);
+         *     const bt_value * const mix = meow;
+         *
+         * If `LibObjT` is non-const, then you may not assign from its
+         * const equivalent. In C (not correct):
+         *
+         *     const bt_value * const meow =
+         *         bt_value_array_borrow_element_by_index_const(some_val, 17);
+         *     bt_value * const mix = meow;
+         */
+        static constexpr bool val =
+            std::is_const<LibObjT>::value || !std::is_const<OtherLibObjT>::value;
+    };
+
+protected:
+    /* libbabeltrace2 object pointer */
+    using _LibObjPtr = LibObjT *;
+
+    /* This complete borrowed object */
+    using _ThisBorrowedObject = BorrowedObject<LibObjT>;
+
+    /*
+     * Builds a borrowed object to wrap the libbabeltrace2 object
+     * pointer `libObjPtr`.
+     *
+     * `libObjPtr` must not be `nullptr`.
+     */
+    explicit BorrowedObject(const _LibObjPtr libObjPtr) noexcept : _mLibObjPtr {libObjPtr}
+    {
+        BT_ASSERT(libObjPtr);
+    }
+
+    /* Default copy operations */
+    BorrowedObject(const BorrowedObject&) noexcept = default;
+    BorrowedObject& operator=(const BorrowedObject&) noexcept = default;
+
+    /*
+     * Generic "copy" constructor.
+     *
+     * This converting constructor accepts both an instance of
+     * `_ThisBorrowedObject` and an instance (`other`) of
+     * `BorrowedObject<ConstLibObjT>`, where `ConstLibObjT` is the
+     * `const` version of `LibObjT`, if applicable.
+     *
+     * This makes it possible for a `BorrowedObject<const bt_something>`
+     * instance to be built from an instance of
+     * `BorrowedObject<bt_something>`. C++ forbids the other way around.
+     */
+    template <typename OtherLibObjT>
+    BorrowedObject(const BorrowedObject<OtherLibObjT>& other) noexcept :
+        BorrowedObject {other._mLibObjPtr}
+    {
+        static_assert(_AssignableFromConst<OtherLibObjT>::val,
+                      "Don't assign a non-const wrapper from a const wrapper.");
+    }
+
+    /*
+     * Generic "assignment" operator.
+     *
+     * This operator accepts both an instance of
+     * `_ThisBorrowedObject` and an instance (`other`) of
+     * `BorrowedObject<ConstLibObjT>`, where `ConstLibObjT` is the
+     * `const` version of `LibObjT`, if applicable.
+     *
+     * This makes it possible for a `BorrowedObject<const bt_something>`
+     * instance to get assigned an instance of
+     * `BorrowedObject<bt_something>`. C++ forbids the other way around,
+     * therefore we use `_EnableIfAssignableT` to show a more relevant
+     * context in the compiler error message.
+     */
+    template <typename OtherLibObjT>
+    _ThisBorrowedObject& operator=(const BorrowedObject<OtherLibObjT>& other) noexcept
+    {
+        static_assert(_AssignableFromConst<OtherLibObjT>::val,
+                      "Don't assign a non-const wrapper from a const wrapper.");
+
+        _mLibObjPtr = other._mLibObjPtr;
+        return *this;
+    }
+
+public:
+    /*
+     * Returns a hash of this object, solely based on its raw
+     * libbabeltrace2 pointer.
+     */
+    std::size_t hash() const noexcept
+    {
+        return std::hash<_LibObjPtr> {}(_mLibObjPtr);
+    }
+
+    /*
+     * Returns whether or not this object is the exact same as `other`,
+     * solely based on the raw libbabeltrace2 pointers.
+     */
+    bool isSame(const _ThisBorrowedObject& other) const noexcept
+    {
+        return _mLibObjPtr == other._mLibObjPtr;
+    }
+
+    /* Wrapped libbabeltrace2 object pointer */
+    _LibObjPtr libObjPtr() const noexcept
+    {
+        return _mLibObjPtr;
+    }
+
+private:
+    _LibObjPtr _mLibObjPtr;
+};
+
+} /* namespace bt2 */
+
+#endif /* BABELTRACE_CPP_COMMON_BT2_BORROWED_OBJECT_HPP */
index c713ca26c83b534c5e6fdb2fec4ba33262063ed2..16bfd23b3678c5afa2bece05dbd8c7ae93c601e0 100644 (file)
@@ -17,7 +17,7 @@
 #include "cpp-common/string_view.hpp"
 #include "cpp-common/uuid-view.hpp"
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "exc.hpp"
 #include "internal/shared-obj.hpp"
 #include "internal/utils.hpp"
@@ -92,11 +92,11 @@ private:
 };
 
 template <typename LibObjT>
-class CommonClockClass final : public BorrowedObj<LibObjT>
+class CommonClockClass final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ThisCommonClockClass = CommonClockClass<LibObjT>;
 
 public:
@@ -106,20 +106,20 @@ public:
     using UserAttributes =
         typename std::conditional<std::is_const<LibObjT>::value, ConstMapValue, MapValue>::type;
 
-    explicit CommonClockClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonClockClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
     CommonClockClass(const CommonClockClass<OtherLibObjT> clkClass) noexcept :
-        _ThisBorrowedObj {clkClass}
+        _ThisBorrowedObject {clkClass}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonClockClass& operator=(const CommonClockClass<OtherLibObjT> clkClass) noexcept
     {
-        _ThisBorrowedObj::operator=(clkClass);
+        _ThisBorrowedObject::operator=(clkClass);
         return *this;
     }
 
index acd399b1eebd08ff8b04afbcc1cb62d72d1a418d..ed30eaf5e4d9f8d51721f96bdad37dd71f74b395 100644 (file)
 
 #include <babeltrace2/babeltrace.h>
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "exc.hpp"
 
 namespace bt2 {
 
-class ConstClockSnapshot final : public BorrowedObj<const bt_clock_snapshot>
+class ConstClockSnapshot final : public BorrowedObject<const bt_clock_snapshot>
 {
 public:
-    explicit ConstClockSnapshot(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit ConstClockSnapshot(const _LibObjPtr libObjPtr) noexcept :
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
     ConstClockSnapshot(const ConstClockSnapshot& clkSnapshot) noexcept :
-        _ThisBorrowedObj {clkSnapshot}
+        _ThisBorrowedObject {clkSnapshot}
     {
     }
 
     ConstClockSnapshot& operator=(const ConstClockSnapshot& clkSnapshot) noexcept
     {
-        _ThisBorrowedObj::operator=(clkSnapshot);
+        _ThisBorrowedObject::operator=(clkSnapshot);
         return *this;
     }
 
index a8bbb3c462c5f8193810d0496e5d5c5bbd1a6d28..67bf9e8a5d5b8b13651feaff90c4be0f21e72328 100644 (file)
@@ -16,7 +16,7 @@
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "common-iter.hpp"
 #include "exc.hpp"
 #include "field-path.hpp"
@@ -161,7 +161,7 @@ enum class FieldClassType
 };
 
 template <typename LibObjT>
-class CommonFieldClass : public BorrowedObj<LibObjT>
+class CommonFieldClass : public BorrowedObject<LibObjT>
 {
     /* Allow appendMember() to call `fc.libObjPtr()` */
     friend class CommonStructureFieldClass<bt_field_class>;
@@ -187,10 +187,10 @@ class CommonFieldClass : public BorrowedObj<LibObjT>
     friend class CommonTraceClass<bt_trace_class>;
 
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
 
 protected:
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ThisCommonFieldClass = CommonFieldClass<LibObjT>;
 
 public:
@@ -199,19 +199,19 @@ public:
     using UserAttributes =
         typename std::conditional<std::is_const<LibObjT>::value, ConstMapValue, MapValue>::type;
 
-    explicit CommonFieldClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonFieldClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonFieldClass(const CommonFieldClass<OtherLibObjT> fc) noexcept : _ThisBorrowedObj {fc}
+    CommonFieldClass(const CommonFieldClass<OtherLibObjT> fc) noexcept : _ThisBorrowedObject {fc}
     {
     }
 
     template <typename OtherLibObjT>
     CommonFieldClass& operator=(const CommonFieldClass<OtherLibObjT> fc) noexcept
     {
-        _ThisBorrowedObj::operator=(fc);
+        _ThisBorrowedObject::operator=(fc);
         return *this;
     }
 
@@ -679,11 +679,11 @@ struct ConstEnumerationFieldClassMappingSpec<const bt_field_class_enumeration_si
 } /* namespace internal */
 
 template <typename LibObjT>
-class ConstEnumerationFieldClassMapping final : public BorrowedObj<LibObjT>
+class ConstEnumerationFieldClassMapping final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
 
 public:
     using RangeSet = typename std::conditional<
@@ -691,19 +691,19 @@ public:
         ConstUnsignedIntegerRangeSet, ConstSignedIntegerRangeSet>::type;
 
     explicit ConstEnumerationFieldClassMapping(const _LibObjPtr libObjPtr) noexcept :
-        _ThisBorrowedObj {libObjPtr}
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
     ConstEnumerationFieldClassMapping(const ConstEnumerationFieldClassMapping& mapping) noexcept :
-        _ThisBorrowedObj {mapping}
+        _ThisBorrowedObject {mapping}
     {
     }
 
     ConstEnumerationFieldClassMapping&
     operator=(const ConstEnumerationFieldClassMapping& mapping) noexcept
     {
-        _ThisBorrowedObj::operator=(mapping);
+        _ThisBorrowedObject::operator=(mapping);
         return *this;
     }
 
@@ -1000,11 +1000,11 @@ struct CommonStructureFieldClassMemberSpec<const bt_field_class_structure_member
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonStructureFieldClassMember final : public BorrowedObj<LibObjT>
+class CommonStructureFieldClassMember final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
 
     using _FieldClass =
         typename std::conditional<std::is_const<LibObjT>::value, ConstFieldClass, FieldClass>::type;
@@ -1014,14 +1014,14 @@ public:
         typename std::conditional<std::is_const<LibObjT>::value, ConstMapValue, MapValue>::type;
 
     explicit CommonStructureFieldClassMember(const _LibObjPtr libObjPtr) noexcept :
-        _ThisBorrowedObj {libObjPtr}
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
     CommonStructureFieldClassMember(const CommonStructureFieldClassMember<OtherLibObjT> fc) noexcept
         :
-        _ThisBorrowedObj {fc}
+        _ThisBorrowedObject {fc}
     {
     }
 
@@ -1029,7 +1029,7 @@ public:
     CommonStructureFieldClassMember<LibObjT>&
     operator=(const CommonStructureFieldClassMember<OtherLibObjT> fc) noexcept
     {
-        _ThisBorrowedObj::operator=(fc);
+        _ThisBorrowedObject::operator=(fc);
         return *this;
     }
 
@@ -1925,11 +1925,11 @@ struct CommonVariantFieldClassOptionSpec<const bt_field_class_variant_option> fi
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonVariantFieldClassOption : public BorrowedObj<LibObjT>
+class CommonVariantFieldClassOption : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
 
     using _FieldClass =
         typename std::conditional<std::is_const<LibObjT>::value, ConstFieldClass, FieldClass>::type;
@@ -1939,13 +1939,13 @@ public:
         typename std::conditional<std::is_const<LibObjT>::value, ConstMapValue, MapValue>::type;
 
     explicit CommonVariantFieldClassOption(const _LibObjPtr libObjPtr) noexcept :
-        _ThisBorrowedObj {libObjPtr}
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
     CommonVariantFieldClassOption(const CommonVariantFieldClassOption<OtherLibObjT> fc) noexcept :
-        _ThisBorrowedObj {fc}
+        _ThisBorrowedObject {fc}
     {
     }
 
@@ -1953,7 +1953,7 @@ public:
     CommonVariantFieldClassOption&
     operator=(const CommonVariantFieldClassOption<OtherLibObjT> fc) noexcept
     {
-        _ThisBorrowedObj::operator=(fc);
+        _ThisBorrowedObject::operator=(fc);
         return *this;
     }
 
@@ -2076,11 +2076,11 @@ struct ConstVariantWithIntegerSelectorFieldClassOptionSpec<
 } /* namespace internal */
 
 template <typename LibObjT>
-class ConstVariantWithIntegerSelectorFieldClassOption : public BorrowedObj<LibObjT>
+class ConstVariantWithIntegerSelectorFieldClassOption : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _Spec = internal::ConstVariantWithIntegerSelectorFieldClassOptionSpec<LibObjT>;
 
 public:
@@ -2091,14 +2091,14 @@ public:
         ConstUnsignedIntegerRangeSet, ConstSignedIntegerRangeSet>::type;
 
     explicit ConstVariantWithIntegerSelectorFieldClassOption(const _LibObjPtr libObjPtr) noexcept :
-        _ThisBorrowedObj {libObjPtr}
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
     ConstVariantWithIntegerSelectorFieldClassOption(
         const ConstVariantWithIntegerSelectorFieldClassOption<OtherLibObjT> fc) noexcept :
-        _ThisBorrowedObj {fc}
+        _ThisBorrowedObject {fc}
     {
     }
 
@@ -2106,7 +2106,7 @@ public:
     ConstVariantWithIntegerSelectorFieldClassOption&
     operator=(const ConstVariantWithIntegerSelectorFieldClassOption<OtherLibObjT> fc) noexcept
     {
-        _ThisBorrowedObj::operator=(fc);
+        _ThisBorrowedObject::operator=(fc);
         return *this;
     }
 
index aac6ffd16ca48113debb2429e55c2f75cc46b741..0416b00a5409090f3a599cd10bbb9fe162cfa57d 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "common/assert.h"
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "common-iter.hpp"
 #include "internal/shared-obj.hpp"
 
@@ -28,20 +28,21 @@ enum class FieldPathItemType
     CURRENT_OPTION_CONTENT = BT_FIELD_PATH_ITEM_TYPE_CURRENT_OPTION_CONTENT,
 };
 
-class ConstFieldPathItem : public BorrowedObj<const bt_field_path_item>
+class ConstFieldPathItem : public BorrowedObject<const bt_field_path_item>
 {
 public:
-    explicit ConstFieldPathItem(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit ConstFieldPathItem(const _LibObjPtr libObjPtr) noexcept :
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
-    ConstFieldPathItem(const ConstFieldPathItem& fpItem) noexcept : _ThisBorrowedObj {fpItem}
+    ConstFieldPathItem(const ConstFieldPathItem& fpItem) noexcept : _ThisBorrowedObject {fpItem}
     {
     }
 
     ConstFieldPathItem& operator=(const ConstFieldPathItem& fpItem) noexcept
     {
-        _ThisBorrowedObj::operator=(fpItem);
+        _ThisBorrowedObject::operator=(fpItem);
         return *this;
     }
 
@@ -123,7 +124,7 @@ struct FieldPathRefFuncs final
 
 } /* namespace internal */
 
-class ConstFieldPath final : public BorrowedObj<const bt_field_path>
+class ConstFieldPath final : public BorrowedObject<const bt_field_path>
 {
 public:
     using Shared =
@@ -139,17 +140,17 @@ public:
         EVENT_PAYLOAD = BT_FIELD_PATH_SCOPE_EVENT_PAYLOAD,
     };
 
-    explicit ConstFieldPath(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit ConstFieldPath(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
-    ConstFieldPath(const ConstFieldPath& fieldPath) noexcept : _ThisBorrowedObj {fieldPath}
+    ConstFieldPath(const ConstFieldPath& fieldPath) noexcept : _ThisBorrowedObject {fieldPath}
     {
     }
 
     ConstFieldPath& operator=(const ConstFieldPath& fieldPath) noexcept
     {
-        _ThisBorrowedObj::operator=(fieldPath);
+        _ThisBorrowedObject::operator=(fieldPath);
         return *this;
     }
 
index 61cdd60a2b894bd8ba3c965405d44f96a5ebad3f..509e66d2f63abc81e5b05c009df502793192dc49 100644 (file)
@@ -16,7 +16,7 @@
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "field-class.hpp"
 #include "internal/utils.hpp"
 
@@ -92,32 +92,32 @@ struct CommonFieldSpec<const bt_field> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonField : public BorrowedObj<LibObjT>
+class CommonField : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
 
 protected:
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ThisCommonField = CommonField<LibObjT>;
 
 public:
     using Class =
         typename std::conditional<std::is_const<LibObjT>::value, ConstFieldClass, FieldClass>::type;
 
-    explicit CommonField(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonField(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonField(const CommonField<OtherLibObjT> val) noexcept : _ThisBorrowedObj {val}
+    CommonField(const CommonField<OtherLibObjT> val) noexcept : _ThisBorrowedObject {val}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonField& operator=(const CommonField<OtherLibObjT> val) noexcept
     {
-        _ThisBorrowedObj::operator=(val);
+        _ThisBorrowedObject::operator=(val);
         return *this;
     }
 
index 1ad8f4c180be7e0c02c98247b349dd4ce9f3506c..eb10992138d6e122a68e5fb41dc1bb7596dfcc10 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <babeltrace2/babeltrace.h>
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "common-iter.hpp"
 #include "exc.hpp"
 #include "integer-range.hpp"
@@ -141,7 +141,7 @@ template <typename LibObjT>
 class CommonTraceClass;
 
 template <typename LibObjT>
-class CommonIntegerRangeSet final : public BorrowedObj<LibObjT>
+class CommonIntegerRangeSet final : public BorrowedObject<LibObjT>
 {
     /* Allow operator==() to call `other.libObjPtr()` */
     friend class CommonIntegerRangeSet<bt_integer_range_set_unsigned>;
@@ -164,8 +164,8 @@ class CommonIntegerRangeSet final : public BorrowedObj<LibObjT>
     friend class CommonTraceClass<bt_trace_class>;
 
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ConstLibObjT = typename std::add_const<LibObjT>::type;
     using _RefFuncs = internal::IntegerRangeSetRefFuncs<_ConstLibObjT>;
     using _Spec = internal::CommonIntegerRangeSetSpec<_ConstLibObjT>;
@@ -182,7 +182,7 @@ public:
     using Iterator = CommonIterator<CommonIntegerRangeSet, Range>;
 
     explicit CommonIntegerRangeSet(const _LibObjPtr libObjPtr) noexcept :
-        _ThisBorrowedObj {libObjPtr}
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
@@ -196,7 +196,7 @@ public:
 
     template <typename OtherLibObjT>
     CommonIntegerRangeSet(const CommonIntegerRangeSet<OtherLibObjT> rangeSet) noexcept :
-        _ThisBorrowedObj {rangeSet}
+        _ThisBorrowedObject {rangeSet}
     {
     }
 
@@ -204,7 +204,7 @@ public:
     _ThisCommonIntegerRangeSet&
     operator=(const CommonIntegerRangeSet<OtherLibObjT> rangeSet) noexcept
     {
-        _ThisBorrowedObj::operator=(rangeSet);
+        _ThisBorrowedObject::operator=(rangeSet);
         return *this;
     }
 
index 03ba0b600737513e118b01fa7121dc1ae602da2c..f41101ee9dddbfc0039b2993b6abc7226c8a2253 100644 (file)
@@ -12,7 +12,7 @@
 
 #include <babeltrace2/babeltrace.h>
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 
 namespace bt2 {
 
@@ -66,11 +66,11 @@ struct ConstIntegerRangeSpec<const bt_integer_range_signed> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class ConstIntegerRange final : public BorrowedObj<LibObjT>
+class ConstIntegerRange final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ThisConstIntegerRange = ConstIntegerRange<LibObjT>;
 
 public:
@@ -79,17 +79,18 @@ public:
                                   std::uint64_t, std::int64_t>::type;
 
 public:
-    explicit ConstIntegerRange(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit ConstIntegerRange(const _LibObjPtr libObjPtr) noexcept :
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
-    ConstIntegerRange(const _ThisConstIntegerRange& range) noexcept : _ThisBorrowedObj {range}
+    ConstIntegerRange(const _ThisConstIntegerRange& range) noexcept : _ThisBorrowedObject {range}
     {
     }
 
     _ThisConstIntegerRange& operator=(const _ThisConstIntegerRange& range) noexcept
     {
-        _ThisBorrowedObj::operator=(range);
+        _ThisBorrowedObject::operator=(range);
         return *this;
     }
 
index eb1980a5ab6e1d5d304c624002b687b11e45297c..e284afe2720fe0e5406e5d27e7a73dd6f705036b 100644 (file)
@@ -17,7 +17,7 @@
 #include "cpp-common/bt2/trace-ir.hpp"
 #include "cpp-common/optional.hpp"
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "internal/shared-obj.hpp"
 #include "internal/utils.hpp"
 
@@ -79,31 +79,31 @@ enum class MessageType
 };
 
 template <typename LibObjT>
-class CommonMessage : public BorrowedObj<LibObjT>
+class CommonMessage : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
 
 protected:
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ThisCommonMessage = CommonMessage<LibObjT>;
 
 public:
     using Shared = internal::SharedMessage<CommonMessage<LibObjT>, LibObjT>;
 
-    explicit CommonMessage(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonMessage(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonMessage(const CommonMessage<OtherLibObjT> val) noexcept : _ThisBorrowedObj {val}
+    CommonMessage(const CommonMessage<OtherLibObjT> val) noexcept : _ThisBorrowedObject {val}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonMessage& operator=(const CommonMessage<OtherLibObjT> val) noexcept
     {
-        _ThisBorrowedObj::operator=(val);
+        _ThisBorrowedObject::operator=(val);
         return *this;
     }
 
index 3a936782d79580f5733523e46fd92c21c3698f33..88ac7b0fb07c2e3f7a117cfb6f488a07fbf07e1d 100644 (file)
@@ -15,7 +15,7 @@
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "clock-class.hpp"
 #include "field-class.hpp"
 #include "field.hpp"
@@ -123,11 +123,11 @@ struct CommonEventSpec<const bt_event> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonEvent final : public BorrowedObj<LibObjT>
+class CommonEvent final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ConstSpec = internal::CommonEventSpec<const bt_event>;
     using _Spec = internal::CommonEventSpec<LibObjT>;
 
@@ -147,19 +147,19 @@ public:
                                             CommonEventClass<const bt_event_class>,
                                             CommonEventClass<bt_event_class>>::type;
 
-    explicit CommonEvent(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonEvent(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonEvent(const CommonEvent<OtherLibObjT> event) noexcept : _ThisBorrowedObj {event}
+    CommonEvent(const CommonEvent<OtherLibObjT> event) noexcept : _ThisBorrowedObject {event}
     {
     }
 
     template <typename OtherLibObjT>
     CommonEvent<LibObjT>& operator=(const CommonEvent<OtherLibObjT> event) noexcept
     {
-        _ThisBorrowedObj::operator=(event);
+        _ThisBorrowedObject::operator=(event);
         return *this;
     }
 
@@ -307,11 +307,11 @@ struct CommonPacketSpec<const bt_packet> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonPacket final : public BorrowedObj<LibObjT>
+class CommonPacket final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ConstSpec = internal::CommonPacketSpec<const bt_packet>;
     using _Spec = internal::CommonPacketSpec<LibObjT>;
     using _ThisCommonPacket = CommonPacket<LibObjT>;
@@ -326,19 +326,19 @@ private:
 public:
     using Shared = internal::SharedObj<_ThisCommonPacket, LibObjT, internal::PacketRefFuncs>;
 
-    explicit CommonPacket(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonPacket(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonPacket(const CommonPacket<OtherLibObjT> packet) noexcept : _ThisBorrowedObj {packet}
+    CommonPacket(const CommonPacket<OtherLibObjT> packet) noexcept : _ThisBorrowedObject {packet}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonPacket& operator=(const CommonPacket<OtherLibObjT> packet) noexcept
     {
-        _ThisBorrowedObj::operator=(packet);
+        _ThisBorrowedObject::operator=(packet);
         return *this;
     }
 
@@ -481,11 +481,11 @@ struct CommonStreamSpec<const bt_stream> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonStream final : public BorrowedObj<LibObjT>
+class CommonStream final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ConstSpec = internal::CommonStreamSpec<const bt_stream>;
     using _Spec = internal::CommonStreamSpec<LibObjT>;
     using _ThisCommonStream = CommonStream<LibObjT>;
@@ -504,19 +504,19 @@ public:
     using UserAttributes =
         typename std::conditional<std::is_const<LibObjT>::value, ConstMapValue, MapValue>::type;
 
-    explicit CommonStream(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonStream(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonStream(const CommonStream<OtherLibObjT> stream) noexcept : _ThisBorrowedObj {stream}
+    CommonStream(const CommonStream<OtherLibObjT> stream) noexcept : _ThisBorrowedObject {stream}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonStream& operator=(const CommonStream<OtherLibObjT> stream) noexcept
     {
-        _ThisBorrowedObj::operator=(stream);
+        _ThisBorrowedObject::operator=(stream);
         return *this;
     }
 
@@ -711,14 +711,14 @@ struct CommonTraceSpec<const bt_trace> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonTrace final : public BorrowedObj<LibObjT>
+class CommonTrace final : public BorrowedObject<LibObjT>
 {
     /* Allow instantiate() to call `trace.libObjPtr()` */
     friend class CommonStreamClass<bt_stream_class>;
 
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ConstSpec = internal::CommonTraceSpec<const bt_trace>;
     using _Spec = internal::CommonTraceSpec<LibObjT>;
     using _ThisCommonTrace = CommonTrace<LibObjT>;
@@ -743,19 +743,19 @@ public:
         ConstValue value;
     };
 
-    explicit CommonTrace(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonTrace(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonTrace(const CommonTrace<OtherLibObjT> trace) noexcept : _ThisBorrowedObj {trace}
+    CommonTrace(const CommonTrace<OtherLibObjT> trace) noexcept : _ThisBorrowedObject {trace}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonTrace& operator=(const CommonTrace<OtherLibObjT> trace) noexcept
     {
-        _ThisBorrowedObj::operator=(trace);
+        _ThisBorrowedObject::operator=(trace);
         return *this;
     }
 
@@ -1047,11 +1047,11 @@ struct CommonEventClassSpec<const bt_event_class> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonEventClass final : public BorrowedObj<LibObjT>
+class CommonEventClass final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ConstSpec = internal::CommonEventClassSpec<const bt_event_class>;
     using _Spec = internal::CommonEventClassSpec<LibObjT>;
     using _ThisCommonEventClass = CommonEventClass<LibObjT>;
@@ -1090,20 +1090,20 @@ public:
         DEBUG = BT_EVENT_CLASS_LOG_LEVEL_DEBUG,
     };
 
-    explicit CommonEventClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonEventClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
     CommonEventClass(const CommonEventClass<OtherLibObjT> eventClass) noexcept :
-        _ThisBorrowedObj {eventClass}
+        _ThisBorrowedObject {eventClass}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonEventClass& operator=(const CommonEventClass<OtherLibObjT> eventClass) noexcept
     {
-        _ThisBorrowedObj::operator=(eventClass);
+        _ThisBorrowedObject::operator=(eventClass);
         return *this;
     }
 
@@ -1423,11 +1423,11 @@ struct CommonStreamClassSpec<const bt_stream_class> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonStreamClass final : public BorrowedObj<LibObjT>
+class CommonStreamClass final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ConstSpec = internal::CommonStreamClassSpec<const bt_stream_class>;
     using _Spec = internal::CommonStreamClassSpec<LibObjT>;
     using _ThisCommonStreamClass = CommonStreamClass<LibObjT>;
@@ -1454,20 +1454,21 @@ public:
     using UserAttributes =
         typename std::conditional<std::is_const<LibObjT>::value, ConstMapValue, MapValue>::type;
 
-    explicit CommonStreamClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonStreamClass(const _LibObjPtr libObjPtr) noexcept :
+        _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
     CommonStreamClass(const CommonStreamClass<OtherLibObjT> streamClass) noexcept :
-        _ThisBorrowedObj {streamClass}
+        _ThisBorrowedObject {streamClass}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonStreamClass& operator=(const CommonStreamClass<OtherLibObjT> streamClass) noexcept
     {
-        _ThisBorrowedObj::operator=(streamClass);
+        _ThisBorrowedObject::operator=(streamClass);
         return *this;
     }
 
@@ -1916,11 +1917,11 @@ struct CommonTraceClassSpec<const bt_trace_class> final
 } /* namespace internal */
 
 template <typename LibObjT>
-class CommonTraceClass final : public BorrowedObj<LibObjT>
+class CommonTraceClass final : public BorrowedObject<LibObjT>
 {
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ConstSpec = internal::CommonTraceClassSpec<const bt_trace_class>;
     using _Spec = internal::CommonTraceClassSpec<LibObjT>;
     using _ThisCommonTraceClass = CommonTraceClass<LibObjT>;
@@ -1936,20 +1937,20 @@ public:
     using UserAttributes =
         typename std::conditional<std::is_const<LibObjT>::value, ConstMapValue, MapValue>::type;
 
-    explicit CommonTraceClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonTraceClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
     CommonTraceClass(const CommonTraceClass<OtherLibObjT> traceClass) noexcept :
-        _ThisBorrowedObj {traceClass}
+        _ThisBorrowedObject {traceClass}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonTraceClass& operator=(const CommonTraceClass<OtherLibObjT> traceClass) noexcept
     {
-        _ThisBorrowedObj::operator=(traceClass);
+        _ThisBorrowedObject::operator=(traceClass);
         return *this;
     }
 
index 9f30b74b35253255b902350411bc97ca4745ff6e..c78b5701785935e803e22b3d09e5075844c12b64 100644 (file)
@@ -18,7 +18,7 @@
 #include "cpp-common/optional.hpp"
 #include "cpp-common/string_view.hpp"
 
-#include "borrowed-obj.hpp"
+#include "borrowed-object.hpp"
 #include "common-iter.hpp"
 #include "exc.hpp"
 #include "internal/shared-obj.hpp"
@@ -100,7 +100,7 @@ template <typename LibObjT>
 class CommonStream;
 
 template <typename LibObjT>
-class CommonValue : public BorrowedObj<LibObjT>
+class CommonValue : public BorrowedObject<LibObjT>
 {
     /* Allow append() to call `val.libObjPtr()` */
     friend class CommonArrayValue<bt_value>;
@@ -121,28 +121,28 @@ class CommonValue : public BorrowedObj<LibObjT>
     friend class CommonValue<const bt_value>;
 
 private:
-    using typename BorrowedObj<LibObjT>::_ThisBorrowedObj;
+    using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
 
 protected:
-    using typename BorrowedObj<LibObjT>::_LibObjPtr;
+    using typename BorrowedObject<LibObjT>::_LibObjPtr;
     using _ThisCommonValue = CommonValue<LibObjT>;
 
 public:
     using Shared = internal::SharedValue<CommonValue<LibObjT>, LibObjT>;
 
-    explicit CommonValue(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
+    explicit CommonValue(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
     }
 
     template <typename OtherLibObjT>
-    CommonValue(const CommonValue<OtherLibObjT> val) noexcept : _ThisBorrowedObj {val}
+    CommonValue(const CommonValue<OtherLibObjT> val) noexcept : _ThisBorrowedObject {val}
     {
     }
 
     template <typename OtherLibObjT>
     _ThisCommonValue& operator=(const CommonValue<OtherLibObjT> val) noexcept
     {
-        _ThisBorrowedObj::operator=(val);
+        _ThisBorrowedObject::operator=(val);
         return *this;
     }
 
This page took 0.045211 seconds and 4 git commands to generate.