#ifndef BABELTRACE_CPP_COMMON_BT2_INTEGER_RANGE_HPP
#define BABELTRACE_CPP_COMMON_BT2_INTEGER_RANGE_HPP
-#include <type_traits>
#include <cstdint>
+#include <type_traits>
+
#include <babeltrace2/babeltrace.h>
-#include "internal/borrowed-obj.hpp"
+#include "borrowed-object.hpp"
namespace bt2 {
-
namespace internal {
template <typename ValueT>
} /* namespace internal */
template <typename LibObjT>
-class ConstIntegerRange final : public internal::BorrowedObj<LibObjT>
+class ConstIntegerRange final : public BorrowedObject<LibObjT>
{
private:
- using typename internal::BorrowedObj<LibObjT>::_ThisBorrowedObj;
- using typename internal::BorrowedObj<LibObjT>::_LibObjPtr;
- using _ThisConstIntegerRange = ConstIntegerRange<LibObjT>;
+ using typename BorrowedObject<LibObjT>::_ThisBorrowedObject;
+ using typename BorrowedObject<LibObjT>::_LibObjPtr;
public:
using Value =
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 ConstIntegerRange& range) noexcept : _ThisBorrowedObject {range}
{
}
- _ThisConstIntegerRange& operator=(const _ThisConstIntegerRange& range) noexcept
+ ConstIntegerRange& operator=(const ConstIntegerRange& range) noexcept
{
- _ThisBorrowedObj::operator=(range);
+ _ThisBorrowedObject::operator=(range);
return *this;
}
- bool operator==(const _ThisConstIntegerRange& other) const noexcept
+ bool operator==(const ConstIntegerRange& other) const noexcept
{
- return internal::ConstIntegerRangeSpec<LibObjT>::isEqual(this->_libObjPtr(),
- other._libObjPtr());
+ return internal::ConstIntegerRangeSpec<LibObjT>::isEqual(this->libObjPtr(),
+ other.libObjPtr());
}
- bool operator!=(const _ThisConstIntegerRange& other) const noexcept
+ bool operator!=(const ConstIntegerRange& other) const noexcept
{
return !(*this == other);
}
Value lower() const noexcept
{
- return internal::ConstIntegerRangeSpec<LibObjT>::lower(this->_libObjPtr());
+ return internal::ConstIntegerRangeSpec<LibObjT>::lower(this->libObjPtr());
}
Value upper() const noexcept
{
- return internal::ConstIntegerRangeSpec<LibObjT>::upper(this->_libObjPtr());
+ return internal::ConstIntegerRangeSpec<LibObjT>::upper(this->libObjPtr());
}
};