Flecs: ecs_query_t Struct 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
ecs_query_t Struct Reference
C API » Core » API types » Query descriptor types.

Queries are lists of constraints (terms) that match entities. More...

`#include <flecs.h>`

## Public Attributes
ecs_header_t | hdr
| Object header.
ecs_term_t * | terms
| Query terms.
int32_t * | sizes
| Component sizes.
ecs_id_t * | ids
| Component ids.
uint64_t | bloom_filter
| Bitmask used to quickly discard tables.
ecs_flags32_t | flags
| Query flags.
int8_t | var_count
| Number of query variables.
int8_t | term_count
| Number of query terms.
int8_t | field_count
| Number of fields returned by query.
ecs_flags32_t | fixed_fields
| Fields with a fixed source.
ecs_flags32_t | var_fields
| Fields with non-$this variable source.
ecs_flags32_t | static_id_fields
| Fields with a static (component) id.
ecs_flags32_t | data_fields
| Fields that have data.
ecs_flags32_t | write_fields
| Fields that write data.
ecs_flags32_t | read_fields
| Fields that read data.
ecs_flags32_t | row_fields
| Fields that must be acquired with field_at.
ecs_flags32_t | shared_readonly_fields
| Fields that don't write shared data.
ecs_flags32_t | set_fields
| Fields that will be set.
ecs_query_cache_kind_t | cache_kind
| Caching policy of query.
char ** | vars
| Array with variable names for iterator.
void * | ctx
| User context to pass to callback.
void * | binding_ctx
| Context to be used for language bindings.
ecs_entity_t | entity
| Entity associated with query (optional)
ecs_world_t * | real_world
| Actual world.
ecs_world_t * | world
| World or stage query was created with.
int32_t | eval_count
| Number of times query is evaluated.

## Detailed Description

Queries are lists of constraints (terms) that match entities.

Created with ecs_query_init().

Definition at line 813 of file flecs.h.

## Member Data Documentation

## ◆ binding_ctx

void* ecs_query_t::binding_ctx

Context to be used for language bindings.

Definition at line 842 of file flecs.h.

## ◆ bloom_filter

uint64_t ecs_query_t::bloom_filter

Bitmask used to quickly discard tables.

Definition at line 820 of file flecs.h.

## ◆ cache_kind

ecs_query_cache_kind_t ecs_query_t::cache_kind

Caching policy of query.

Definition at line 837 of file flecs.h.

## ◆ ctx

void* ecs_query_t::ctx

User context to pass to callback.

Definition at line 841 of file flecs.h.

## ◆ data_fields

ecs_flags32_t ecs_query_t::data_fields

Fields that have data.

Definition at line 830 of file flecs.h.

## ◆ entity

ecs_entity_t ecs_query_t::entity

Entity associated with query (optional)

Definition at line 844 of file flecs.h.

## ◆ eval_count

int32_t ecs_query_t::eval_count

Number of times query is evaluated.

Definition at line 848 of file flecs.h.

## ◆ field_count

int8_t ecs_query_t::field_count

Number of fields returned by query.

Definition at line 824 of file flecs.h.

## ◆ fixed_fields

ecs_flags32_t ecs_query_t::fixed_fields

Fields with a fixed source.

Definition at line 827 of file flecs.h.

## ◆ flags

ecs_flags32_t ecs_query_t::flags

Query flags.

Definition at line 821 of file flecs.h.

## ◆ hdr

ecs_header_t ecs_query_t::hdr

Object header.

Definition at line 814 of file flecs.h.

## ◆ ids

ecs_id_t* ecs_query_t::ids

Component ids.

Indexed by field

Definition at line 818 of file flecs.h.

## ◆ read_fields

ecs_flags32_t ecs_query_t::read_fields

Fields that read data.

Definition at line 832 of file flecs.h.

## ◆ real_world

ecs_world_t* ecs_query_t::real_world

Actual world.

Definition at line 845 of file flecs.h.

## ◆ row_fields

ecs_flags32_t ecs_query_t::row_fields

Fields that must be acquired with field_at.

Definition at line 833 of file flecs.h.

## ◆ set_fields

ecs_flags32_t ecs_query_t::set_fields

Fields that will be set.

Definition at line 835 of file flecs.h.

## ◆ shared_readonly_fields

ecs_flags32_t ecs_query_t::shared_readonly_fields

Fields that don't write shared data.

Definition at line 834 of file flecs.h.

## ◆ sizes

int32_t* ecs_query_t::sizes

Component sizes.

Indexed by field

Definition at line 817 of file flecs.h.

## ◆ static_id_fields

ecs_flags32_t ecs_query_t::static_id_fields

Fields with a static (component) id.

Definition at line 829 of file flecs.h.

## ◆ term_count

int8_t ecs_query_t::term_count

Number of query terms.

Definition at line 823 of file flecs.h.

## ◆ terms

ecs_term_t* ecs_query_t::terms

Query terms.

Definition at line 816 of file flecs.h.

## ◆ var_count

int8_t ecs_query_t::var_count

Number of query variables.

Definition at line 822 of file flecs.h.

## ◆ var_fields

ecs_flags32_t ecs_query_t::var_fields

Fields with non-$this variable source.

Definition at line 828 of file flecs.h.

## ◆ vars

char** ecs_query_t::vars

Array with variable names for iterator.

Definition at line 839 of file flecs.h.

## ◆ world

ecs_world_t* ecs_query_t::world

World or stage query was created with.

Definition at line 846 of file flecs.h.

## ◆ write_fields

ecs_flags32_t ecs_query_t::write_fields

Fields that write data.

Definition at line 831 of file flecs.h.

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

- include/flecs.h