![]() |
Flecs v4.1
A fast entity component system (ECS) for C & C++
|
Forward declaration of iter_iterable. More...
#include <iterable.hpp>
Public Member Functions | |
| template<typename Iterable > | |
| iter_iterable (Iterable *it, flecs::world_t *world) | |
| Construct iter_iterable from an iterable and a world. | |
| iter_iterable< Components... > & | set_var (int var_id, flecs::entity_t value) |
| Set query variable by ID. | |
| iter_iterable< Components... > & | set_var (const char *name, flecs::entity_t value) |
| Set query variable by name to an entity value. | |
| iter_iterable< Components... > & | set_var (const char *name, flecs::table_t *value) |
| Set query variable by name to a table value. | |
| iter_iterable< Components... > & | set_var (const char *name, ecs_table_range_t value) |
| Set query variable by name to a table range (C type). | |
| iter_iterable< Components... > & | set_var (const char *name, flecs::table_range value) |
| Set query variable by name to a table range. | |
| int32_t | count () |
| Return the total number of entities in the result. | |
| bool | is_true () |
| Return whether the iterator yields at least one result. | |
| flecs::entity | first () |
| Return the first matching entity. | |
| iter_iterable< Components... > & | set_group (uint64_t group_id) |
| Limit results to tables with the specified group ID (grouped queries only). | |
| template<typename Group > | |
| iter_iterable< Components... > & | set_group () |
| Limit results to tables with the specified group type (grouped queries only). | |
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. | |
| iter_iterable< Components... > | iter (flecs::iter &iter) const |
| Create an iterator. | |
| iter_iterable< Components... > | iter (flecs::entity e) 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_var (const char *name, flecs::entity_t value) const |
| Set query variable by name to an entity value. | |
| iter_iterable< Components... > | set_var (const char *name, flecs::table_t *value) const |
| Set query variable by name to a table value. | |
| iter_iterable< Components... > | set_var (const char *name, ecs_table_range_t value) const |
| Set query variable by name to a table range (C type). | |
| iter_iterable< Components... > | set_var (const char *name, flecs::table_range value) const |
| Set query variable by name to a table range. | |
| iter_iterable< Components... > | set_group (uint64_t group_id) const |
| Limit results to tables with the specified group ID (grouped queries only). | |
| iter_iterable< Components... > | set_group () const |
| Limit results to tables with the specified group type (grouped queries only). | |
| virtual | ~iterable () |
| Virtual destructor. | |
Protected Member Functions | |
| ecs_iter_t | get_iter (flecs::world_t *world) const override |
| ecs_iter_next_action_t | next_action () const override |
Additional Inherited Members | |
Protected Attributes inherited from flecs::iterable< Components... > | |
| friend | iter_iterable< Components... > |
| friend | page_iterable< Components... > |
| friend | worker_iterable< Components... > |
Forward declaration of iter_iterable.
Iterable adapter for iterating with iter/each/run.
Definition at line 176 of file iterable.hpp.
|
inline |
Construct iter_iterable from an iterable and a world.
Definition at line 179 of file iterable.hpp.
|
inline |
Return the total number of entities in the result.
Definition at line 233 of file iterable.hpp.
|
inline |
Return the first matching entity.
Definition at line 251 of file iterable.hpp.
|
inlineoverrideprotectedvirtual |
Implements flecs::iterable< Components... >.
Definition at line 274 of file iterable.hpp.
|
inline |
Return whether the iterator yields at least one result.
Definition at line 242 of file iterable.hpp.
|
inlineoverrideprotectedvirtual |
Implements flecs::iterable< Components... >.
Definition at line 283 of file iterable.hpp.
|
inline |
Limit results to tables with the specified group type (grouped queries only).
Definition at line 268 of file iterable.hpp.
|
inline |
Limit results to tables with the specified group ID (grouped queries only).
Definition at line 261 of file iterable.hpp.
|
inline |
Set query variable by name to a table range (C type).
Definition at line 212 of file iterable.hpp.
|
inline |
Set query variable by name to an entity value.
Definition at line 196 of file iterable.hpp.
|
inline |
Set query variable by name to a table range.
Definition at line 220 of file iterable.hpp.
|
inline |
Set query variable by name to a table value.
Definition at line 204 of file iterable.hpp.
|
inline |
Set query variable by ID.
Definition at line 189 of file iterable.hpp.