cpp-common/bt2: `User*Component`: pass query method data to user `_query` methods
[babeltrace.git] / src / cpp-common / bt2 / field-path.hpp
index 8f20405d324778ce94f80b47de1fab0936389af3..2d4af443a3e5b0e9d6d8c495c1e6c4af455bb240 100644 (file)
@@ -13,8 +13,8 @@
 
 #include "common/assert.h"
 
+#include "borrowed-object-iterator.hpp"
 #include "borrowed-object.hpp"
-#include "common-iterator.hpp"
 #include "shared-object.hpp"
 
 namespace bt2 {
@@ -31,21 +31,11 @@ enum class FieldPathItemType
 class ConstFieldPathItem : public BorrowedObject<const bt_field_path_item>
 {
 public:
-    explicit ConstFieldPathItem(const _LibObjPtr libObjPtr) noexcept :
+    explicit ConstFieldPathItem(const LibObjPtr libObjPtr) noexcept :
         _ThisBorrowedObject {libObjPtr}
     {
     }
 
-    ConstFieldPathItem(const ConstFieldPathItem& fpItem) noexcept : _ThisBorrowedObject {fpItem}
-    {
-    }
-
-    ConstFieldPathItem& operator=(const ConstFieldPathItem& fpItem) noexcept
-    {
-        _ThisBorrowedObject::operator=(fpItem);
-        return *this;
-    }
-
     FieldPathItemType type() const noexcept
     {
         return static_cast<FieldPathItemType>(this->_libType());
@@ -78,23 +68,12 @@ private:
 class ConstIndexFieldPathItem final : public ConstFieldPathItem
 {
 public:
-    explicit ConstIndexFieldPathItem(const _LibObjPtr libObjPtr) noexcept :
+    explicit ConstIndexFieldPathItem(const LibObjPtr libObjPtr) noexcept :
         ConstFieldPathItem {libObjPtr}
     {
         BT_ASSERT_DBG(this->isIndex());
     }
 
-    ConstIndexFieldPathItem(const ConstIndexFieldPathItem& fpItem) noexcept :
-        ConstFieldPathItem {fpItem}
-    {
-    }
-
-    ConstIndexFieldPathItem& operator=(const ConstIndexFieldPathItem& fpItem) noexcept
-    {
-        ConstFieldPathItem::operator=(fpItem);
-        return *this;
-    }
-
     std::uint64_t index() const noexcept
     {
         return bt_field_path_item_index_get_index(this->libObjPtr());
@@ -128,8 +107,7 @@ class ConstFieldPath final : public BorrowedObject<const bt_field_path>
 {
 public:
     using Shared = SharedObject<ConstFieldPath, const bt_field_path, internal::FieldPathRefFuncs>;
-
-    using Iterator = CommonIterator<ConstFieldPath, ConstFieldPathItem>;
+    using Iterator = BorrowedObjectIterator<ConstFieldPath>;
 
     enum class Scope
     {
@@ -139,18 +117,8 @@ public:
         EVENT_PAYLOAD = BT_FIELD_PATH_SCOPE_EVENT_PAYLOAD,
     };
 
-    explicit ConstFieldPath(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
-    {
-    }
-
-    ConstFieldPath(const ConstFieldPath& fieldPath) noexcept : _ThisBorrowedObject {fieldPath}
-    {
-    }
-
-    ConstFieldPath& operator=(const ConstFieldPath& fieldPath) noexcept
+    explicit ConstFieldPath(const LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
     {
-        _ThisBorrowedObject::operator=(fieldPath);
-        return *this;
     }
 
     Scope rootScope() const noexcept
This page took 0.023695 seconds and 4 git commands to generate.