#define BABELTRACE_CPP_COMMON_BT2_CLOCK_SNAPSHOT_HPP
#include <cstdint>
+
#include <babeltrace2/babeltrace.h>
-#include "internal/borrowed-obj.hpp"
+#include "borrowed-object.hpp"
+#include "clock-class.hpp"
#include "exc.hpp"
namespace bt2 {
-class ConstClockSnapshot final : public internal::BorrowedObj<const bt_clock_snapshot>
+class ConstClockSnapshot final : public BorrowedObject<const bt_clock_snapshot>
{
public:
- explicit ConstClockSnapshot(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObj {libObjPtr}
- {
- }
-
- ConstClockSnapshot(const ConstClockSnapshot& clkSnapshot) noexcept :
- _ThisBorrowedObj {clkSnapshot}
+ explicit ConstClockSnapshot(const LibObjPtr libObjPtr) noexcept :
+ _ThisBorrowedObject {libObjPtr}
{
}
- ConstClockSnapshot& operator=(const ConstClockSnapshot& clkSnapshot) noexcept
+ ConstClockClass clockClass() const noexcept
{
- _ThisBorrowedObj::operator=(clkSnapshot);
- return *this;
+ return ConstClockClass {bt_clock_snapshot_borrow_clock_class_const(this->libObjPtr())};
}
std::uint64_t value() const noexcept