14 flecs::from_json_desc_t *desc =
nullptr)
const
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.
#define ecs_err(...)
Error macro.
#define ECS_INTERNAL_ERROR
Internal error code.
const ecs_type_info_t * ecs_get_type_info(const ecs_world_t *world, ecs_id_t component)
Get the type info for a component.
ecs_entity_t entity_t
Entity type.
ecs_type_info_t type_info_t
Type info type.
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 an entity has a component and return a pointer.
ecs_size_t size
Size of the 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 a 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 a pair from JSON.
const Self & set_json(flecs::id_t e, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set a component from JSON.
const Self & set_json(const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set a pair from JSON.
const Self & set_json(const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set a component from JSON.
const Self & set_json(flecs::entity_t t, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set a pair from JSON.
flecs::type type() const
Get the entity's type.
flecs::id_t id_
The raw ID value.
flecs::world_t * world_
World is optional, but guarantees that entity identifiers extracted from the ID are valid.