Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::query< Components > Struct Template Reference
Inheritance diagram for flecs::query< Components >:
flecs::query_base flecs::iterable< Components... >

Public Member Functions

flecs::world world () const
 
 query_base ()
 
 query_base (world_t *world, query_t *query=nullptr)
 
 query_base (world_t *world, ecs_query_desc_t *desc)
 
- Public Member Functions inherited from flecs::query_base
 query_base (world_t *world, query_t *query=nullptr)
 
 query_base (world_t *world, ecs_query_desc_t *desc)
 
 operator query_t * () const
 
bool changed () const
 Returns whether the query data changed since the last iteration. More...
 
bool orphaned () const
 Returns whether query is orphaned. More...
 
const flecs::query_group_info_tgroup_info (uint64_t group_id) const
 Get info for group. More...
 
void * group_ctx (uint64_t group_id) const
 Get context for group. More...
 
void destruct ()
 Free the query. More...
 
template<typename Func >
void each_term (const Func &func) const
 
filter_base filter () const
 
flecs::term term (int32_t index) const
 
int32_t field_count () const
 
flecs::string str () const
 
flecs::entity entity () const
 
 operator query () const
 
- Public Member Functions inherited from flecs::iterable< Components... >
void each (Func &&func) const
 Each iterator. More...
 
void each (flecs::world_t *world, Func &&func) const
 
void each (flecs::iter &it, Func &&func) const
 
void each (flecs::entity e, Func &&func) const
 
flecs::entity find (Func &&func) const
 
void iter (Func &&func) const
 Iter iterator. More...
 
void iter (flecs::world_t *world, Func &&func) const
 
void iter (flecs::iter &it, Func &&func) const
 
void iter (flecs::entity e, Func &&func) const
 
iter_iterable< Components... > iter (flecs::world_t *world=nullptr) const
 Create iterator. More...
 
page_iterable< Components... > page (int32_t offset, int32_t limit)
 Page iterator. More...
 
worker_iterable< Components... > worker (int32_t index, int32_t count)
 Worker iterator. More...
 
int32_t count () const
 Return number of entities matched by iterable. More...
 
bool is_true () const
 Return whether iterable has any matches. More...
 
flecs::entity first () const
 Return first entity matched by iterable. More...
 

Additional Inherited Members

- Protected Member Functions inherited from flecs::iterable< Components... >
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
 
void iterate (flecs::world_t *stage, Func &&func, NextFunc next, Args &&... args) const
 
flecs::entity iterate_find (flecs::world_t *stage, Func &&func, NextFunc next, Args &&... args) const
 
- Protected Attributes inherited from flecs::query_base
world_t * m_world
 
query_t * m_query
 
- 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::query< Components >

Definition at line 136 of file impl.hpp.

Member Function Documentation

◆ query_base() [1/3]

template<typename ... Components>
flecs::query_base::query_base ( )
inline

Definition at line 17 of file impl.hpp.

◆ query_base() [2/3]

template<typename ... Components>
flecs::query_base::query_base ( world_t *  world,
ecs_query_desc_t desc 
)
inline

Definition at line 25 of file impl.hpp.

◆ query_base() [3/3]

template<typename ... Components>
flecs::query_base::query_base ( world_t *  world,
query_t *  query = nullptr 
)
inline

Definition at line 21 of file impl.hpp.

◆ world()

template<typename ... Components>
flecs::world flecs::query< Components >::world ( ) const
inline

Definition at line 138 of file impl.hpp.


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