Flecs: flecs::iter_iterable< 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
flecs::iter_iterable< Components > Struct Template Reference
Inheritance diagram for flecs::iter_iterable< Components >:
[legend]

## Public Member Functions
template<typename Iterable>
| iter_iterable (Iterable *it, flecs::world_t *world)
iter_iterable< Components... > & | set_var (int var_id, flecs::entity_t value)
iter_iterable< Components... > & | set_var (const char *name, flecs::entity_t value)
iter_iterable< Components... > & | set_var (const char *name, flecs::table_t *value)
iter_iterable< Components... > & | set_var (const char *name, ecs_table_range_t value)
iter_iterable< Components... > & | set_var (const char *name, flecs::table_range value)
flecs::string | to_json (flecs::iter_to_json_desc_t *desc=nullptr)
| Serialize iterator result to JSON.
int32_t | count ()
bool | is_true ()
flecs::entity | first ()
iter_iterable< Components... > & | set_group (uint64_t group_id)
template<typename Group>
iter_iterable< Components... > & | set_group ()
Public Member Functions inherited from flecs::iterable< Components... >
void | each (Func &&func) const
| Each iterator.
void | run (Func &&func) const
| Run iterator.
flecs::entity | find (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.
iter_iterable< Components... > | set_var (int var_id, flecs::entity_t value) const
iter_iterable< Components... > | set_group (uint64_t group_id) const

## 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... >

## Detailed Description

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

Definition at line 155 of file iterable.hpp.

## Constructor & Destructor Documentation

## ◆ iter_iterable()

template<typename ... Components>
template<typename Iterable>

flecs::iter_iterable< Components >::iter_iterable | ( | Iterable * | it,
|  | flecs::world_t * | world )
| inline

Definition at line 157 of file iterable.hpp.

## Member Function Documentation

## ◆ count()

template<typename ... Components>

int32_t flecs::iter_iterable< Components >::count | ( |  | ) |
| inline

Definition at line 206 of file iterable.hpp.

## ◆ first()

template<typename ... Components>

flecs::entity flecs::iter_iterable< Components >::first | ( |  | ) |
| inline

Definition at line 224 of file iterable.hpp.

## ◆ get_iter()

template<typename ... Components>

ecs_iter_t flecs::iter_iterable< Components >::get_iter | ( | flecs::world_t * | world | ) | const
| inlineoverrideprotectedvirtual

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

Definition at line 247 of file iterable.hpp.

## ◆ is_true()

template<typename ... Components>

bool flecs::iter_iterable< Components >::is_true | ( |  | ) |
| inline

Definition at line 215 of file iterable.hpp.

## ◆ next_action()

template<typename ... Components>

ecs_iter_next_action_t flecs::iter_iterable< Components >::next_action | ( |  | ) | const
| inlineoverrideprotectedvirtual

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

Definition at line 256 of file iterable.hpp.

## ◆ set_group() [1/2]

template<typename ... Components>
template<typename Group>

iter_iterable< Components... > & flecs::iter_iterable< Components >::set_group | ( |  | ) |
| inline

Definition at line 241 of file iterable.hpp.

## ◆ set_group() [2/2]

template<typename ... Components>

iter_iterable< Components... > & flecs::iter_iterable< Components >::set_group | ( | uint64_t | group_id | ) |
| inline

Definition at line 234 of file iterable.hpp.

## ◆ set_var() [1/5]

template<typename ... Components>

iter_iterable< Components... > & flecs::iter_iterable< Components >::set_var | ( | const char * | name,
|  | ecs_table_range_t | value )
| inline

Definition at line 186 of file iterable.hpp.

## ◆ set_var() [2/5]

template<typename ... Components>

iter_iterable< Components... > & flecs::iter_iterable< Components >::set_var | ( | const char * | name,
|  | flecs::entity_t | value )
| inline

Definition at line 172 of file iterable.hpp.

## ◆ set_var() [3/5]

template<typename ... Components>

iter_iterable< Components... > & flecs::iter_iterable< Components >::set_var | ( | const char * | name,
|  | flecs::table_range | value )
| inline

Definition at line 193 of file iterable.hpp.

## ◆ set_var() [4/5]

template<typename ... Components>

iter_iterable< Components... > & flecs::iter_iterable< Components >::set_var | ( | const char * | name,
|  | flecs::table_t * | value )
| inline

Definition at line 179 of file iterable.hpp.

## ◆ set_var() [5/5]

template<typename ... Components>

iter_iterable< Components... > & flecs::iter_iterable< Components >::set_var | ( | int | var_id,
|  | flecs::entity_t | value )
| inline

Definition at line 166 of file iterable.hpp.

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

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