14 flecs::from_json_desc_t *desc =
nullptr)
const
18 ecs_err(
"id is not a type");
25 ecs_assert(ptr != NULL, ECS_INTERNAL_ERROR, NULL);
41 flecs::from_json_desc_t *desc =
nullptr)
const
43 return set_json(ecs_pair(r, t), json, desc);
54 flecs::from_json_desc_t *desc =
nullptr)
const
64template <
typename R,
typename T>
67 flecs::from_json_desc_t *desc =
nullptr)
const
84 flecs::from_json_desc_t *desc =
nullptr)
const
100 flecs::from_json_desc_t *desc =
nullptr)
const
FLECS_API const char * ecs_ptr_from_json(const ecs_world_t *world, ecs_entity_t type, void *ptr, const char *json, const ecs_from_json_desc_t *desc)
Parse JSON string into value.
#define ecs_assert(condition, error_code,...)
Assert.
const ecs_type_info_t * ecs_get_type_info(const ecs_world_t *world, ecs_id_t component)
Get the type info for an component.
void ecs_modified_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t component)
Signal that a component has been modified.
void * ecs_ensure_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t component, size_t size)
Ensure entity has component, return pointer.
ecs_size_t size
Size of type.
ecs_entity_t component
Handle to component (do not set)
const Self & set_json_second(flecs::entity_t r, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set pair from JSON.
const Self & set_json(flecs::entity_t r, flecs::entity_t t, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set pair from JSON.
const Self & set_json(flecs::id_t e, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set component from JSON.
const Self & set_json(const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set pair from JSON.
const Self & set_json(const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set component from JSON.
const Self & set_json(flecs::entity_t t, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set pair from JSON.
flecs::type type() const
Get the entity's type.