13 template <
typename ... Components>
14 using query_builder_base =
builder<
16 query_builder_i, Components ...>;
23template <
typename ... Components>
24struct query_builder final : _::query_builder_base<Components...> {
26 : _::query_builder_base<Components...>(
world)
29 this->desc_.entity = query_entity.
id();
33 : _::query_builder_base<Components...>(
world)
36 if (
name !=
nullptr) {
39 entity_desc.
sep =
"::";
45 template <
typename Func>
46 void each(Func&& func) {
47 this->build().each(FLECS_FWD(func));
ecs_world_t world_t
World type.
ecs_entity_t ecs_entity_init(ecs_world_t *world, const ecs_entity_desc_t *desc)
Find or create an entity.
struct ecs_query_desc_t ecs_query_desc_t
Used with ecs_query_init().
Used with ecs_entity_init().
const char * sep
Optional custom separator for hierarchical names.
const char * root_sep
Optional, used for identifiers relative to the root.
const char * name
Name of the entity.
entity_t id() const
Get entity ID.
Base & name(const char *name)
Specify the value of the identifier by name.
flecs::query_builder< Comps... > query_builder(Args &&... args) const
Create a query builder.
flecs::query< Comps... > query(Args &&... args) const
Create a query.