18 ecs_err(
"id is not a type");
25 ecs_assert(ptr != NULL, ECS_INTERNAL_ERROR, NULL);
43 return set_json(ecs_pair(r, t), json, desc);
64template <
typename R,
typename T>
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 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.
void * ecs_ensure_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id, size_t size)
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.
Used with ecs_ptr_from_json(), ecs_entity_from_json().
Type that contains component information (passed to ctors/dtors/...)
ecs_size_t size
Size of type.
ecs_entity_t component
Handle to component (do not set)