11 entt::meta_factory<id_component>{}
12 .type(
"id_component"_hs)
34 try_save(ar, ser20::make_nvp(
"id", hpp::to_string(obj.id)));
43 if(
try_load(ar, ser20::make_nvp(
"id", suuid)))
45 auto id = hpp::uuid::from_string(suuid);
46 obj.id =
id.value_or(hpp::uuid{});
attributes::value_type attribute
std::map< std::string, meta_any > attributes
BinaryInputArchive iarchive_binary_t
simd::JSONOutputArchive oarchive_associative_t
BinaryOutputArchive oarchive_binary_t
simd::JSONInputArchive iarchive_associative_t
#define SAVE_INSTANTIATE(cls, Archive)
auto try_save(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
#define LOAD_INSTANTIATE(cls, Archive)
auto try_load(Archive &ar, ser20::NameValuePair< T > &&t, const hpp::source_location &loc=hpp::source_location::current()) -> bool
Component that provides a unique identifier (UUID) for an entity.
hpp::uuid id
The unique identifier for the entity.