3#include "mc/_HeaderOutputPredefine.h"
5#include "ll/api/reflection/TypeName.h"
6#include "ll/api/utils/HashUtils.h"
24template <
typename Category>
28 [[nodiscard]]
constexpr typeid_t(
typeid_t const& other) : value(other.value) {}
34 [[nodiscard]]
constexpr typeid_t(ushort value) : value(value) {}
35 [[nodiscard]]
constexpr typeid_t() =
default;
37 constexpr bool operator==(
typeid_t const& other)
const {
return value == other.value; }
39 static std::atomic_ushort& _getCounter() {
42 static std::atomic_ushort storage;
52LLAPI ushort crtypidImpl(
size_t Type);
54template <
typename Category,
typename Type>
56 if constexpr (std::is_same_v<Category, CommandRegistry>) {
57 constexpr size_t hash = ll::hash_utils::doHash(ll::reflection::type_raw_name_v<Type>);
58 return crtypidImpl(hash);
60 static typeid_t<Category>
id{++typeid_t<Category>::_getCounter()};
Definition CommandIntegerRange.h:5
Definition CommandPositionFloat.h:8
Definition CommandPosition.h:13
Definition CommandRegistry.h:44
Definition CommandSelector.h:11
Definition WildcardCommandSelector.h:7
Definition ActorDefinitionIdentifier.h:13