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;
44 constexpr
bool operator<(
const class_id& other)
const noexcept;
53 string_view m_svClassName = QX_TEXT(
"Empty name");
57 constexpr
bool class_id::operator==(
const class_id& other)
const noexcept
59 return m_nId == other.m_nId;
62 constexpr
bool class_id::operator!=(
const class_id& other)
const noexcept
64 return m_nId != other.m_nId;
67 constexpr
bool class_id::operator<(
const class_id& other)
const noexcept
69 return m_nId < other.m_nId;
89 struct std::hash<qx::class_id>
91 constexpr
size_t operator()(
const qx::class_id&
id)
const noexcept
100 template<
class FormatContextType>
101 constexpr
auto format(
const qx::class_id&
id, FormatContextType& ctx)
const
103 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)