|
| template<typename Func > |
| void | each (Func &&func) const |
| | Each iterator.
|
| |
| template<typename Func > |
| void | each (flecs::world_t *world, Func &&func) const |
| |
| template<typename Func > |
| void | each (flecs::iter &it, Func &&func) const |
| |
| template<typename Func > |
| void | each (flecs::entity e, Func &&func) const |
| |
| template<typename Func > |
| flecs::entity | find (Func &&func) const |
| |
| template<typename Func > |
| void | iter (Func &&func) const |
| | Iter iterator.
|
| |
| template<typename Func > |
| void | iter (flecs::world_t *world, Func &&func) const |
| |
| template<typename Func > |
| void | iter (flecs::iter &it, Func &&func) const |
| |
| template<typename Func > |
| void | iter (flecs::entity e, Func &&func) const |
| |
| iter_iterable< Components... > | iter (flecs::world_t *world=nullptr) const |
| | Create 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 number of entities matched by iterable.
|
| |
| bool | is_true () const |
| | Return whether iterable has any matches.
|
| |
| flecs::entity | first () const |
| | Return first entity matched by iterable.
|
| |
|
|
virtual ecs_iter_t | get_iter (flecs::world_t *stage) const =0 |
| |
|
virtual ecs_iter_next_action_t | next_action () const =0 |
| |
|
virtual ecs_iter_next_action_t | next_each_action () const =0 |
| |
| template<template< typename Func, typename ... Comps > class Delegate, typename Func , typename NextFunc , typename ... Args> |
| void | iterate (flecs::world_t *stage, Func &&func, NextFunc next, Args &&... args) const |
| |
| template<template< typename Func, typename ... Comps > class Delegate, typename Func , typename NextFunc , typename ... Args> |
| flecs::entity | iterate_find (flecs::world_t *stage, Func &&func, NextFunc next, Args &&... args) const |
| |
template<typename ... Components>
struct flecs::iterable< Components >
Definition at line 18 of file iterable.hpp.
template<typename ... Components>
template<typename Func >
Iter iterator.
The "iter" iterator accepts a function that is invoked for each matching table. The following function signatures are valid:
- func(flecs::iter& it, Components* ...)
- func(Components& ...)
Iter iterators are not automatically instanced. When a result contains shared components, entities of the result will be iterated one by one. This ensures that applications can't accidentally read out of bounds by accessing a shared component as an array.
Definition at line 70 of file iterable.hpp.
template<typename ... Components>
template<template< typename Func, typename ... Comps > class Delegate, typename Func , typename NextFunc , typename ... Args>
| void flecs::iterable< Components >::iterate |
( |
flecs::world_t * |
stage, |
|
|
Func && |
func, |
|
|
NextFunc |
next, |
|
|
Args &&... |
args |
|
) |
| const |
|
inlineprotected |