cpp-common/bt2: `User*Component`: pass query method data to user `_query` methods
[babeltrace.git] / src / cpp-common / bt2 / clock-snapshot.hpp
index ed30eaf5e4d9f8d51721f96bdad37dd71f74b395..38ea940b56adcfa4652d0bbfa1b632ac9d099b7c 100644 (file)
@@ -12,6 +12,7 @@
 #include <babeltrace2/babeltrace.h>
 
 #include "borrowed-object.hpp"
+#include "clock-class.hpp"
 #include "exc.hpp"
 
 namespace bt2 {
@@ -19,20 +20,14 @@ namespace bt2 {
 class ConstClockSnapshot final : public BorrowedObject<const bt_clock_snapshot>
 {
 public:
-    explicit ConstClockSnapshot(const _LibObjPtr libObjPtr) noexcept :
+    explicit ConstClockSnapshot(const LibObjPtr libObjPtr) noexcept :
         _ThisBorrowedObject {libObjPtr}
     {
     }
 
-    ConstClockSnapshot(const ConstClockSnapshot& clkSnapshot) noexcept :
-        _ThisBorrowedObject {clkSnapshot}
+    ConstClockClass clockClass() const noexcept
     {
-    }
-
-    ConstClockSnapshot& operator=(const ConstClockSnapshot& clkSnapshot) noexcept
-    {
-        _ThisBorrowedObject::operator=(clkSnapshot);
-        return *this;
+        return ConstClockClass {bt_clock_snapshot_borrow_clock_class_const(this->libObjPtr())};
     }
 
     std::uint64_t value() const noexcept
This page took 0.022944 seconds and 4 git commands to generate.