2024-07-29 20:03:24 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "./obj_components.hpp"
|
2023-07-24 13:20:53 +02:00
|
|
|
|
|
|
|
#include <entt/core/type_info.hpp>
|
|
|
|
|
|
|
|
// TODO: move more central
|
|
|
|
#define DEFINE_COMP_ID(x) \
|
|
|
|
template<> \
|
|
|
|
constexpr entt::id_type entt::type_hash<x>::value() noexcept { \
|
2024-04-15 01:05:08 +02:00
|
|
|
using namespace entt::literals; \
|
|
|
|
return #x##_hs; \
|
|
|
|
} \
|
|
|
|
template<> \
|
|
|
|
constexpr std::string_view entt::type_name<x>::value() noexcept { \
|
|
|
|
return #x; \
|
2023-07-24 13:20:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// cross compile(r) stable ids
|
|
|
|
|
2024-07-29 20:03:24 +02:00
|
|
|
DEFINE_COMP_ID(ObjComp::Tox::FileID)
|
|
|
|
DEFINE_COMP_ID(ObjComp::Tox::FileKind)
|
|
|
|
|
|
|
|
// tmp
|
|
|
|
DEFINE_COMP_ID(ObjComp::Tox::TagIncomming)
|
|
|
|
DEFINE_COMP_ID(ObjComp::Tox::TagOutgoing)
|
|
|
|
|
|
|
|
DEFINE_COMP_ID(ObjComp::Ephemeral::ToxTransferFriend)
|
2024-10-06 19:58:44 +02:00
|
|
|
DEFINE_COMP_ID(ObjComp::Ephemeral::ToxMessage)
|
2023-07-24 13:20:53 +02:00
|
|
|
|
|
|
|
#undef DEFINE_COMP_ID
|
|
|
|
|