Flecs v4.0
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 >:
[legend]

Public Member Functions

 query (const query &obj)
 
queryoperator= (const query &obj)
 
 query (query &&obj) noexcept
 
queryoperator= (query &&obj) noexcept
 
 query_base ()
 
 query_base (query_t *q)
 
 query_base (const query_t *q)
 
 query_base (world_t *world, ecs_query_desc_t *desc)
 
 query_base (const query_base &obj)
 
 query_base (query_base &&obj) noexcept
 
- Public Member Functions inherited from flecs::query_base
 query_base (query_t *q)
 
 query_base (const query_t *q)
 
 query_base (world_t *world, ecs_query_desc_t *desc)
 
 query_base (const query_base &obj)
 
query_baseoperator= (const query_base &obj)
 
 query_base (query_base &&obj) noexcept
 
query_baseoperator= (query_base &&obj) noexcept
 
flecs::entity entity ()
 
const flecs::query_tc_ptr () const
 
 operator const flecs::query_t * () const
 
 operator bool () const
 
void destruct ()
 Free persistent query.
 
bool changed () const
 Returns whether the query data changed since the last iteration.
 
const flecs::query_group_info_tgroup_info (uint64_t group_id) const
 Get info for group.
 
void * group_ctx (uint64_t group_id) const
 Get context for group.
 
template<typename Func >
void each_term (const Func &func)
 
flecs::term term (int32_t index)
 
int32_t term_count ()
 
int32_t field_count ()
 
int32_t find_var (const char *name)
 
flecs::string str ()
 
flecs::string plan () const
 Returns a string representing the query plan.
 
 operator query<> () const
 
flecs::string to_json (flecs::iter_to_json_desc_t *desc=nullptr)
 Serialize query to JSON.
 
- 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.
 
iter_iterable< Components... > iter (flecs::iter &iter) const
 Create iterator.
 
iter_iterable< Components... > iter (flecs::entity e) 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)
 
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)
 
iter_iterable< Components... > set_group (uint64_t group_id)
 
iter_iterable< Components... > set_group ()
 

Additional Inherited Members

- Protected Attributes inherited from flecs::query_base
query_tquery_ = nullptr
 
- 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 189 of file impl.hpp.

Constructor & Destructor Documentation

◆ query() [1/3]

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

Definition at line 196 of file impl.hpp.

◆ query() [2/3]

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

Definition at line 198 of file impl.hpp.

◆ query() [3/3]

template<typename ... Components>
flecs::query< Components >::query ( query< Components > && obj)
inlinenoexcept

Definition at line 205 of file impl.hpp.

Member Function Documentation

◆ operator=() [1/2]

template<typename ... Components>
query & flecs::query< Components >::operator= ( const query< Components > & obj)
inline

Definition at line 200 of file impl.hpp.

◆ operator=() [2/2]

template<typename ... Components>
query & flecs::query< Components >::operator= ( query< Components > && obj)
inlinenoexcept

Definition at line 207 of file impl.hpp.

◆ query_base() [1/6]

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

Definition at line 14 of file impl.hpp.

◆ query_base() [2/6]

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

Definition at line 40 of file impl.hpp.

◆ query_base() [3/6]

template<typename ... Components>
flecs::query_base::query_base ( const query_t * q)
inline

Definition at line 21 of file impl.hpp.

◆ query_base() [4/6]

template<typename ... Components>
flecs::query_base::query_base ( query_base && obj)
inlinenoexcept

Definition at line 51 of file impl.hpp.

◆ query_base() [5/6]

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

Definition at line 16 of file impl.hpp.

◆ query_base() [6/6]

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

Definition at line 26 of file impl.hpp.


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