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

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

Loading...
Searching...
No Matches
flecs::worker_iterable< Components > Struct Template Reference

Forward declaration of worker_iterable. More...

`#include <iterable.hpp>`

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

## Public Member Functions
| worker_iterable (int32_t index, int32_t count, iterable< Components... > *it)
| Construct a worker_iterable from an index, count, and source iterable.
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.

## Protected Member Functions
ecs_iter_t | get_iter (flecs::world_t *) const
ecs_iter_next_action_t | next_action () const

## Additional Inherited Members
Protected Attributes inherited from flecs::iterable< Components... >
friend | iter_iterable< Components... >
friend | page_iterable< Components... >
friend | worker_iterable< Components... >

## Detailed Description

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

Forward declaration of worker_iterable.

Worker iterable adapter.

Divides entities across workers.

Definition at line 348 of file iterable.hpp.

## Constructor & Destructor Documentation

## ◆ worker_iterable()

template<typename ... Components>

flecs::worker_iterable< Components >::worker_iterable | ( | int32_t | index,
|  | int32_t | count,
|  | iterable< Components... > * | it )
| inline

Construct a worker_iterable from an index, count, and source iterable.

Definition at line 350 of file iterable.hpp.

## Member Function Documentation

## ◆ get_iter()

template<typename ... Components>

ecs_iter_t flecs::worker_iterable< Components >::get_iter | ( | flecs::world_t * |  | ) | const
| inlineprotectedvirtual

Implements flecs::iterable< Components... >.

Definition at line 358 of file iterable.hpp.

## ◆ next_action()

template<typename ... Components>

ecs_iter_next_action_t flecs::worker_iterable< Components >::next_action | ( |  | ) | const
| inlineprotectedvirtual

Implements flecs::iterable< Components... >.

Definition at line 362 of file iterable.hpp.

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

- include/flecs/addons/cpp/utils/iterable.hpp