14 flecs::from_json_desc_t *desc =
nullptr)
const
18 ecs_err(
"id is not a type");
23 ecs_assert(ptr != NULL, ECS_INTERNAL_ERROR, NULL);
39 flecs::from_json_desc_t *desc =
nullptr)
const
41 return set_json(ecs_pair(r, t), json, desc);
52 flecs::from_json_desc_t *desc =
nullptr)
const
62template <
typename R,
typename T>
65 flecs::from_json_desc_t *desc =
nullptr)
const
82 flecs::from_json_desc_t *desc =
nullptr)
const
98 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.
void * ecs_ensure_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Get a mutable pointer to a component.
void ecs_modified_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Signal that a component has been modified.
ecs_entity_t ecs_get_typeid(const ecs_world_t *world, ecs_id_t id)
Get the type for an id.
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.