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 static std::atomic_ushort& _getCounter() {
53 static std::atomic_ushort storage;
60LLAPI std::atomic_ushort& typeid_t<CommandRegistry>::_getCounter();
63LLAPI ushort crtypidImpl(
size_t type);
65template <
typename Category,
typename Type>
67 static_assert(std::is_same_v<Category, CommandRegistry>);
68 constexpr size_t hash = ll::hash_utils::doHash(ll::reflection::type_raw_name_v<Type>);
73template <
typename Category,
typename Type>
75 if constexpr (std::is_same_v<Category, CommandRegistry>) {
76 return typeid_storage_impl<Category, Type>().template get<Category>();
Definition CommandRegistry.h:51