![]() |
Flecs v4.1
A fast entity component system (ECS) for C & C++
|
Typed query. More...
#include <impl.hpp>
Public Member Functions | |
| query () | |
| Default constructor. | |
| query (const query &obj) | |
| Copy constructor. | |
| query & | operator= (const query &obj) |
| Copy assignment operator. | |
| query (query &&obj) noexcept | |
| Move constructor. | |
| query & | operator= (query &&obj) noexcept |
| Move assignment operator. | |
| flecs::query | cache_query () const |
| Get the cache query, if any. | |
| query_base () | |
| Default constructor. | |
| query_base (query_t *q) | |
| Construct from a mutable query pointer. | |
| query_base (const query_t *q) | |
| Construct from a const query pointer. | |
| query_base (world_t *world, ecs_query_desc_t *desc) | |
| Construct from a world and a query descriptor. | |
| query_base (const query_base &obj) | |
| Copy constructor. | |
| query_base (query_base &&obj) noexcept | |
| Move constructor. | |
| Public Member Functions inherited from flecs::query_base | |
| query_base () | |
| Default constructor. | |
| query_base (query_t *q) | |
| Construct from a mutable query pointer. | |
| query_base (const query_t *q) | |
| Construct from a const query pointer. | |
| query_base (world_t *world, ecs_query_desc_t *desc) | |
| Construct from a world and a query descriptor. | |
| query_base (const query_base &obj) | |
| Copy constructor. | |
| query_base & | operator= (const query_base &obj) |
| Copy assignment operator. | |
| query_base (query_base &&obj) noexcept | |
| Move constructor. | |
| query_base & | operator= (query_base &&obj) noexcept |
| Move assignment operator. | |
| flecs::entity | entity () const |
| Get the entity associated with the query. | |
| const flecs::query_t * | c_ptr () const |
| Get a pointer to the underlying C query. | |
| operator const flecs::query_t * () const | |
| Convert to a const query pointer. | |
| operator bool () const | |
| Check if the query is valid. | |
| void | destruct () |
| Free a persistent query. | |
| ~query_base () | |
| Destructor. | |
| bool | changed () const |
| Return whether the query data changed since the last iteration. | |
| const flecs::query_group_info_t * | group_info (uint64_t group_id) const |
| Get info for a group. | |
| void * | group_ctx (uint64_t group_id) const |
| Get context for a group. | |
| template<typename Func> | |
| void | each_term (const Func &func) |
| Iterate each term in the query, invoking a callback for each. | |
| flecs::term | term (int32_t index) const |
| Get term at the specified index. | |
| int32_t | term_count () const |
| Get the number of terms in the query. | |
| int32_t | field_count () const |
| Get the number of fields in the query. | |
| int32_t | find_var (const char *name) const |
| Find a variable by name. | |
| flecs::string | str () const |
| Convert the query to a string expression. | |
| flecs::string | plan () const |
| Return a string representing the query plan. | |
| operator query<> () const | |
| Convert to a typed query. | |
| flecs::string | to_json (flecs::iter_to_json_desc_t *desc=nullptr) |
| Serialize a query to JSON. | |
| flecs::string | to_json (flecs::iter_to_json_desc_t *desc=nullptr) |
| Serialize a query to JSON. | |
| Public Member Functions inherited from flecs::iterable< Components... > | |
| void | each (Func &&func) const |
| Each iterator. | |
| void | run (Func &&func) const |
| Run the iterator. | |
| flecs::entity | find (Func &&func) const |
| Find the first entity matching a condition. | |
| iter_iterable< Components... > | iter (flecs::world_t *world=nullptr) const |
| Create an iterator. | |
| page_iterable< Components... > | page (int32_t offset, int32_t limit) |
| Page iterator. | |
| worker_iterable< Components... > | worker (int32_t index, int32_t count) |
| Worker iterator. | |
| int32_t | count () const |
| Return the number of entities matched by the iterable. | |
| bool | is_true () const |
| Return whether the iterable has any matches. | |
| flecs::entity | first () const |
| Return the first entity matched by the iterable. | |
| iter_iterable< Components... > | set_var (int var_id, flecs::entity_t value) const |
| Set query variable by ID. | |
| iter_iterable< Components... > | set_group (uint64_t group_id) const |
| Limit results to tables with the specified group ID (grouped queries only). | |
| virtual | ~iterable () |
| Virtual destructor. | |
Additional Inherited Members | |
| Protected Attributes inherited from flecs::query_base | |
| query_t * | query_ = nullptr |
| Protected Attributes inherited from flecs::iterable< Components... > | |
| friend | iter_iterable< Components... > |
| friend | page_iterable< Components... > |
| friend | worker_iterable< Components... > |
Typed query.
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |