32 explicit id(flecs::id_t value)
36 explicit id(flecs::world_t *
world, flecs::id_t value = 0)
44 explicit id(flecs::world_t *
world,
const char *expr)
53 : world_(
first.world_)
58 return (id_ & ECS_ID_FLAGS_MASK) == flecs::PAIR;
68 return !(id_ & ECS_ID_FLAGS_MASK);
96 return (id_ & ECS_ID_FLAGS_MASK) != 0;
107 return ECS_PAIR_FIRST(id_) ==
first;
137 operator flecs::id_t()
const {
146 flecs::world_t *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 (component) id to string.
bool ecs_id_is_wildcard(ecs_id_t id)
Utility to check if id is a wildcard.
ecs_id_t ecs_id_from_str(const ecs_world_t *world, const char *expr)
Convert string to a (component) id.
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.