private:
using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
using typename BorrowedObject<LibObjT>::_LibObjPtr;
- using _ThisCommonClockClass = CommonClockClass<LibObjT>;
public:
- using Shared = SharedObject<_ThisCommonClockClass, LibObjT, internal::ClockClassRefFuncs>;
-
- using UserAttributes =
- typename std::conditional<std::is_const<LibObjT>::value, ConstMapValue, MapValue>::type;
+ using Shared = SharedObject<CommonClockClass, LibObjT, internal::ClockClassRefFuncs>;
+ using UserAttributes = internal::DepUserAttrs<LibObjT>;
explicit CommonClockClass(const _LibObjPtr libObjPtr) noexcept : _ThisBorrowedObject {libObjPtr}
{
}
template <typename OtherLibObjT>
- _ThisCommonClockClass& operator=(const CommonClockClass<OtherLibObjT> clkClass) noexcept
+ CommonClockClass& operator=(const CommonClockClass<OtherLibObjT> clkClass) noexcept
{
_ThisBorrowedObject::operator=(clkClass);
return *this;
void frequency(const std::uint64_t frequency) const noexcept
{
- static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+ static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
bt_clock_class_set_frequency(this->libObjPtr(), frequency);
}
void offset(const ClockClassOffset& offset) const noexcept
{
- static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+ static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
bt_clock_class_set_offset(this->libObjPtr(), offset.seconds(), offset.cycles());
}
void precision(const std::uint64_t precision) const noexcept
{
- static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+ static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
bt_clock_class_set_precision(this->libObjPtr(), precision);
}
void originIsUnixEpoch(const bool originIsUnixEpoch) const noexcept
{
- static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+ static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
bt_clock_class_set_origin_is_unix_epoch(this->libObjPtr(),
static_cast<bt_bool>(originIsUnixEpoch));
void name(const char * const name) const
{
- static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+ static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
const auto status = bt_clock_class_set_name(this->libObjPtr(), name);
void description(const char * const description) const
{
- static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+ static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
const auto status = bt_clock_class_set_description(this->libObjPtr(), description);
template <typename LibValT>
void userAttributes(const CommonMapValue<LibValT> userAttrs) const noexcept
{
- static_assert(!std::is_const<LibObjT>::value, "`LibObjT` must NOT be `const`.");
+ static_assert(!std::is_const<LibObjT>::value, "Not available with `bt2::ConstClockClass`.");
bt_clock_class_set_user_attributes(this->libObjPtr(), userAttrs.libObjPtr());
}