32 explicit id(flecs::id_t value)
36 explicit id(flecs::world_t *
world, flecs::id_t value = 0)
49 : m_world(
first.m_world)
54 return (m_id & ECS_ID_FLAGS_MASK) == flecs::Pair;
64 return !(m_id & ECS_ID_FLAGS_MASK);
92 return (m_id & ECS_ID_FLAGS_MASK) != 0;
103 return ECS_PAIR_FIRST(m_id) ==
first;
133 operator flecs::id_t()
const {
142 flecs::world_t *m_world;
const char * ecs_id_flag_str(ecs_id_t id_flags)
Convert id flag to string.
char * ecs_id_str(const ecs_world_t *world, ecs_id_t id)
Convert id to string.
bool ecs_id_is_wildcard(ecs_id_t id)
Utility to check if id is a wildcard.
Class that wraps around a flecs::id_t.
bool is_pair() const
Test if id is pair (has first, second)
flecs::entity entity() const
Return id as entity (only allowed when id is valid entity)
flecs::entity flags() const
Return id flags set on id.
flecs::entity remove_flags() const
Return id without role.
flecs::entity type_id() const
Return component type of id.
flecs::entity add_flags(flecs::id_t flags) const
Return id with role added.
bool has_relation(flecs::id_t first) const
Test if id has specified first.
bool has_flags(flecs::id_t flags) const
Test if id has specified role.
flecs::id_t raw_id() const
Return flecs::id_t value.
bool is_entity() const
Test if id is entity.
flecs::entity second() const
Get second element from a pair.
flecs::entity first() const
Get first element from a pair.
bool has_flags() const
Test if id has any role.
flecs::string flags_str() const
Convert role of id to string.
flecs::entity remove_generation() const
Return id without role.
bool is_wildcard() const
Test if id is a wildcard.