3#include "mc/_HeaderOutputPredefine.h"
5#include "ll/api/reflection/TypeName.h"
6#include "ll/api/utils/HashUtils.h"
11template <
typename Category>
21 template <
typename Category>
28static_assert(std::is_trivially_copyable_v<type_id_ref>);
29static_assert(std::is_aggregate_v<type_id_ref>);
35template <
typename Category>
39 [[nodiscard]]
constexpr typeid_t(typeid_t
const& other) : value(other.value) {}
40 constexpr typeid_t& operator=(typeid_t
const& other) {
45 [[nodiscard]]
constexpr typeid_t(ushort value) : value(value) {}
46 [[nodiscard]]
constexpr typeid_t() =
default;
48 constexpr bool operator==(typeid_t
const& other)
const {
return value == other.value; }
50 constexpr bool operator<(typeid_t
const& other)
const {
return value < other.value; }
52 static std::atomic_ushort& _getCounter() {
55 static std::atomic_ushort storage;
62LLAPI std::atomic_ushort& typeid_t<CommandRegistry>::_getCounter();
65LLAPI ushort crtypidImpl(
size_t type);
67template <
typename Category,
typename Type>
69 static_assert(std::is_same_v<Category, CommandRegistry>);
70 constexpr size_t hash = ll::hash_utils::doHash(ll::reflection::type_raw_name_v<Type>);
75template <
typename Category,
typename Type>
77 if constexpr (std::is_same_v<Category, CommandRegistry>) {
78 return typeid_storage_impl<Category, Type>().template get<Category>();
Definition CommandRegistry.h:51