Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::page_iterable< Components > Struct Template Reference

Forward declaration of page_iterable. More...

#include <iterable.hpp>

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

Public Member Functions

template<typename Iterable >
 page_iterable (int32_t offset, int32_t limit, Iterable *it)
 Construct a page_iterable from an offset, limit, 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.
 
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 *) 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::page_iterable< Components >

Forward declaration of page_iterable.

Paged iterable adapter.

Limits iteration to a range of entities.

Definition at line 313 of file iterable.hpp.

Constructor & Destructor Documentation

◆ page_iterable()

template<typename ... Components>
template<typename Iterable >
flecs::page_iterable< Components >::page_iterable ( int32_t offset,
int32_t limit,
Iterable * it )
inline

Construct a page_iterable from an offset, limit, and source iterable.

Definition at line 316 of file iterable.hpp.

Member Function Documentation

◆ get_iter()

template<typename ... Components>
ecs_iter_t flecs::page_iterable< Components >::get_iter ( flecs::world_t * ) const
inlineprotectedvirtual

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

Definition at line 324 of file iterable.hpp.

◆ next_action()

template<typename ... Components>
ecs_iter_next_action_t flecs::page_iterable< Components >::next_action ( ) const
inlineprotectedvirtual

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

Definition at line 328 of file iterable.hpp.


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