28 friend std::hash<class_id>;
31 constexpr
class_id() noexcept =
default;
42 constexpr
bool operator==(
const class_id& other)
const noexcept;
43 constexpr
bool operator!=(
const class_id& other)
const noexcept;
46 constexpr
bool operator<(
const class_id& other)
const noexcept;
48 constexpr
operator size_t() const noexcept;
57 string_view m_svClassName;
63 return m_nId == other.m_nId;
66 constexpr
bool class_id::operator!=(
const class_id& other)
const noexcept
68 return m_nId != other.m_nId;
71 constexpr
bool class_id::operator<(
const class_id& other)
const noexcept
73 return m_nId < other.m_nId;
76 constexpr class_id::operator size_t() const noexcept
98 struct std::hash<qx::class_id>
100 constexpr
size_t operator()(
const qx::class_id&
id)
const noexcept
109 template<
class FormatContextType>
110 constexpr
auto format(
const qx::class_id&
id, FormatContextType& ctx)
const
112 return std::format_to(ctx.out(), QX_TEXT(
"{}"),
id.get_class_name());
Class id, unique for each class using qx rtti system.
constexpr static class_id create()
Create a class id for a given type (the type doesn't require to use qx rtti system)
constexpr string_view get_class_name() const
Get class name.
static constexpr string_view_type get_signature()
Get type signature (full name with template parameters)