24 ref() : world_(
nullptr), ref_{} { }
41 "cannot create ref to empty type");
51 world_, &ref_, this->ref_.id));
53 ecs_assert(result != NULL, ECS_INVALID_PARAMETER,
54 "nullptr dereference by flecs::ref");
61 world_, &ref_, this->ref_.id));
65 if (!world_ || !ref_.entity) {
#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.
ecs_ref_t ecs_ref_init_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Create a component ref.
void * ecs_ref_get_id(const ecs_world_t *world, ecs_ref_t *ref, ecs_id_t id)
Get component from ref.
ecs_entity_t ecs_get_typeid(const ecs_world_t *world, ecs_id_t id)
Get the type for an id.
const ecs_world_t * ecs_get_world(const ecs_poly_t *poly)
Get world from poly.
Type that contains component information (passed to ctors/dtors/...)
ecs_size_t size
Size of type.
entity_t id() const
Get entity id.
Class that wraps around a flecs::id_t.
flecs::entity entity() const
Return entity associated with reference.
flecs::id component() const
Return component associated with reference.