Flecs: flecs::query_builder< Components > Struct Template Reference
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.0 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
Public Member Functions | List of all members
flecs::query_builder< Components > Struct Template Reference
C++ API » Core » Queries

Query builder. More...

`#include <builder.hpp>`

Inheritance diagram for flecs::query_builder< Components >:
[legend]

## Public Member Functions
| query_builder (flecs::world_t *world, flecs::entity query_entity)
| query_builder (flecs::world_t *world, const char *name=nullptr)
template<typename Func>
void | each (Func &&func)
Public Member Functions inherited from flecs::_::builder< query, ecs_query_desc_t, query_builder< Components... >, query_builder_i, Components ... >
| builder (flecs::world_t *world)
| builder (const builder &f)
| builder (builder &&f) noexcept
| operator ecs_query_desc_t * ()
query< Components ... > | build ()
| builder (flecs::world_t *world)
| builder (const builder &f)
| builder (builder &&f) noexcept
| operator ecs_query_desc_t * ()
query< Components ... > | build ()
Public Member Functions inherited from flecs::query_builder_i< Base, Components >
| query_builder_i (ecs_query_desc_t *desc, int32_t term_index=0)
Base & | query_flags (ecs_flags32_t flags)
Base & | cache_kind (query_cache_kind_t kind)
Base & | cached ()
Base & | expr (const char *expr)
template<typename T>
Base & | with ()
Base & | with (id_t id)
Base & | with (const char *name)
Base & | with (const char *first, const char *second)
Base & | with (entity_t r, entity_t o)
Base & | with (entity_t r, const char *o)
Base & | with (const char *r, entity_t o)
template<typename First>
Base & | with (id_t o)
template<typename First>
Base & | with (const char *second)
template<typename First, typename Second>
Base & | with ()
template<typename E, if_t< is_enum< E >::value > = 0>
Base & | with (E value)
Base & | with (flecs::term &term)
Base & | with (flecs::term &&term)
template<typename ... Args>
Base & | without (Args &&... args)
template<typename T, typename ... Args>
Base & | without (Args &&... args)
template<typename First, typename Second>
Base & | without ()
Base & | write ()
template<typename ... Args>
Base & | write (Args &&... args)
template<typename T, typename ... Args>
Base & | write (Args &&... args)
template<typename First, typename Second>
Base & | write ()
Base & | read ()
template<typename ... Args>
Base & | read (Args &&... args)
template<typename T, typename ... Args>
Base & | read (Args &&... args)
template<typename First, typename Second>
Base & | read ()
Base & | scope_open ()
Base & | scope_close ()
Base & | term ()
Base & | term_at (int32_t term_index)
template<typename T>
Base & | order_by (int(*compare)(flecs::entity_t, const T *, flecs::entity_t, const T *))
| Sort the output of a query.
Base & | order_by (flecs::entity_t component, int(*compare)(flecs::entity_t, const void *, flecs::entity_t, const void *))
| Sort the output of a query.
template<typename T>
Base & | group_by (uint64_t(*group_by_action)(flecs::world_t *, flecs::table_t *table, flecs::id_t id, void *ctx))
| Group and sort matched tables.
Base & | group_by (flecs::entity_t component, uint64_t(*group_by_action)(flecs::world_t *, flecs::table_t *table, flecs::id_t id, void *ctx))
| Group and sort matched tables.
template<typename T>
Base & | group_by ()
| Group and sort matched tables.
Base & | group_by (flecs::entity_t component)
| Group and sort matched tables.
Base & | group_by_ctx (void *ctx, ecs_ctx_free_t ctx_free=nullptr)
| Specify context to be passed to group_by function.
Base & | on_group_create (ecs_group_create_action_t action)
| Specify on_group_create action.
Base & | on_group_delete (ecs_group_delete_action_t action)
| Specify on_group_delete action.
Public Member Functions inherited from flecs::term_builder_i< Base >
| term_builder_i (ecs_term_t *term_ptr)
Base & | term (id_t id)
Base & | src ()
Base & | first ()
Base & | second ()
Base & | src (flecs::entity_t id)
template<typename T>
Base & | src ()
Base & | src (const char *name)
Base & | first (flecs::entity_t id)
template<typename T>
Base & | first ()
Base & | first (const char *name)
Base & | second (flecs::entity_t id)
template<typename T>
Base & | second ()
Base & | second (const char *name)
Base & | up (flecs::entity_t trav=0)
template<typename Trav>
Base & | up ()
Base & | cascade (flecs::entity_t trav=0)
template<typename Trav>
Base & | cascade ()
Base & | desc ()
Base & | parent ()
Base & | trav (flecs::entity_t trav, flecs::flags32_t flags=0)
Base & | id_flags (id_t flags)
| Set id flags for term.
Base & | inout (flecs::inout_kind_t inout)
| Set read/write access of term.
Base & | inout_stage (flecs::inout_kind_t inout)
| Set read/write access for stage.
Base & | write ()
| Short for inout_stage(flecs::Out).
Base & | read ()
| Short for inout_stage(flecs::In).
Base & | read_write ()
| Short for inout_stage(flecs::InOut).
Base & | in ()
| Short for inout(flecs::In)
Base & | out ()
| Short for inout(flecs::Out)
Base & | inout ()
| Short for inout(flecs::InOut)
Base & | inout_none ()
| Short for inout(flecs::In)
Base & | oper (flecs::oper_kind_t oper)
| Set operator of term.
Base & | and_ ()
Base & | or_ ()
Base & | not_ ()
Base & | optional ()
Base & | and_from ()
Base & | or_from ()
Base & | not_from ()
Base & | singleton ()
| Match singleton.
Base & | filter ()
Public Member Functions inherited from flecs::term_ref_builder_i< Base >
Base & | self ()
Base & | id (flecs::entity_t id)
Base & | entity (flecs::entity_t entity)
Base & | name (const char *name)
Base & | var (const char *var_name)
Base & | flags (flecs::flags32_t flags)

## Additional Inherited Members
Public Types inherited from flecs::_::builder< query, ecs_query_desc_t, query_builder< Components... >, query_builder_i, Components ... >
using | IBase
using | IBase
Public Attributes inherited from flecs::term_builder_i< Base >
ecs_term_t * | term_
Public Attributes inherited from flecs::term_ref_builder_i< Base >
ecs_term_ref_t * | term_ref_
Protected Member Functions inherited from flecs::_::builder< query, ecs_query_desc_t, query_builder< Components... >, query_builder_i, Components ... >
flecs::world_t * | world_v () override
flecs::world_t * | world_v () override
Protected Member Functions inherited from flecs::term_builder_i< Base >
void | set_term (ecs_term_t *term)
Protected Member Functions inherited from flecs::term_ref_builder_i< Base >
void | assert_term_ref ()
Protected Attributes inherited from flecs::_::builder< query, ecs_query_desc_t, query_builder< Components... >, query_builder_i, Components ... >
ecs_query_desc_t | desc_
flecs::world_t * | world_
ecs_query_desc_t | desc_
flecs::world_t * | world_
Protected Attributes inherited from flecs::query_builder_i< Base, Components >
int32_t | term_index_
int32_t | expr_count_

## Detailed Description

template<typename ... Components>
struct flecs::query_builder< Components >

Query builder.

Definition at line 23 of file decl.hpp.

## Constructor & Destructor Documentation

## ◆ query_builder() [1/2]

template<typename ... Components>

flecs::query_builder< Components >::query_builder | ( | flecs::world_t * | world,
|  | flecs::entity | query_entity )
| inline

Definition at line 25 of file builder.hpp.

## ◆ query_builder() [2/2]

template<typename ... Components>

flecs::query_builder< Components >::query_builder | ( | flecs::world_t * | world,
|  | const char * | name = nullptr )
| inline

Definition at line 32 of file builder.hpp.

## Member Function Documentation

## ◆ each()

template<typename ... Components>
template<typename Func>

void flecs::query_builder< Components >::each | ( | Func && | func | ) |
| inline

Definition at line 46 of file builder.hpp.

The documentation for this struct was generated from the following files:

- include/flecs/addons/cpp/mixins/query/builder.hpp
- include/flecs/addons/cpp/mixins/query/decl.hpp