74template <
typename ... Args>
75inline flecs::id world::id(Args&&... args)
const {
79template <
typename First,
typename Second>
84 _::type<First>::id(
world_),
85 _::type<Second>::id(
world_)));
88template <
typename First>
91 "cannot create nested pairs");
96 _::type<First>::id(
world_),
102 "cannot create nested pairs");
#define ecs_assert(condition, error_code,...)
Assert.
#define ECS_INVALID_OPERATION
Invalid operation error code.
#define ECS_INVALID_PARAMETER
Invalid parameter error code.
ecs_entity_t entity_t
Entity type.
ecs_entity_t ecs_get_typeid(const ecs_world_t *world, ecs_id_t component)
Get the type for a component.
ecs_entity_t ecs_get_alive(const ecs_world_t *world, ecs_entity_t e)
Get an alive identifier.
Class that wraps around a flecs::id_t.
bool is_pair() const
Test if ID is a pair (has first, second).
flecs::entity entity() const
Return ID as entity (only allowed when ID is a valid entity).
flecs::world world() const
Get the world.
flecs::entity flags() const
Return ID flags set on ID.
flecs::entity remove_flags() const
Return ID without flags.
flecs::entity type_id() const
Return component type of ID.
flecs::entity add_flags(flecs::id_t flags) const
Return ID with flags added.
flecs::id_t id_
The raw ID value.
flecs::entity second() const
Get second element from a pair.
flecs::world_t * world_
World is optional, but guarantees that entity identifiers extracted from the ID are valid.
flecs::entity first() const
Get first element from a pair.
flecs::entity remove_generation() const
Return ID without generation.
world_t * world_
Pointer to the underlying C world.
flecs::id pair() const
Get pair ID from relationship and object.