![]() |
Flecs v3.2
A fast entity component system (ECS) for C & C++
|
Class for iterating over query results. More...
#include <iter.hpp>
Public Member Functions | |
iter (ecs_iter_t *it) | |
Construct iterator from C iterator object. More... | |
row_iterator | begin () const |
row_iterator | end () const |
flecs::entity | system () const |
flecs::entity | event () const |
flecs::id | event_id () const |
flecs::world | world () const |
const flecs::iter_t * | c_ptr () const |
size_t | count () const |
ecs_ftime_t | delta_time () const |
ecs_ftime_t | delta_system_time () const |
flecs::type | type () const |
flecs::table | table () const |
flecs::table_range | range () const |
void * | ctx () |
Access ctx. More... | |
template<typename T > | |
T * | ctx () |
Access ctx. More... | |
void * | param () |
Access param. More... | |
template<typename T > | |
T * | param () |
Access param. More... | |
flecs::entity | entity (size_t row) const |
Obtain mutable handle to entity being iterated over. More... | |
bool | is_self (int32_t index) const |
Returns whether field is matched on self. More... | |
bool | is_set (int32_t index) const |
Returns whether field is set. More... | |
bool | is_readonly (int32_t index) const |
Returns whether field is readonly. More... | |
int32_t | field_count () const |
Number of fields in iteator. More... | |
size_t | size (int32_t index) const |
Size of field data type. More... | |
flecs::entity | src (int32_t index) const |
Obtain field source (0 if This). More... | |
flecs::id | id (int32_t index) const |
Obtain id matched for field. More... | |
flecs::id | pair (int32_t index) const |
Obtain pair id matched for field. More... | |
int32_t | column_index (int32_t index) const |
Obtain column index for field. More... | |
flecs::string | str () const |
Convert current iterator result to string. More... | |
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value, void >::type * = nullptr> | |
flecs::column< A > | field (int32_t index) const |
Get readonly access to field data. More... | |
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value==false, void >::type * = nullptr> | |
flecs::column< A > | field (int32_t index) const |
Get read/write access to field data. More... | |
flecs::untyped_column | field (int32_t index) const |
Get unchecked access to field data. More... | |
flecs::column< const flecs::entity_t > | entities () const |
Get readonly access to entity ids. More... | |
int32_t | table_count () const |
Obtain the total number of tables the iterator will iterate over. More... | |
bool | changed () |
Check if the current table has changed since the last iteration. More... | |
void | skip () |
Skip current table. More... | |
uint64_t | group_id () const |
flecs::entity | get_var (int var_id) const |
Get value of variable by id. More... | |
flecs::entity | get_var (const char *name) const |
Get value of variable by name. More... | |
flecs::string | to_json (flecs::iter_to_json_desc_t *desc=nullptr) |
Serialize iterator result to JSON. More... | |
iter_iterable< Components... > & | set_var (const char *name, flecs::entity_t value) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get read/write access to field data.
If the matched id for the specified field does not match with the provided type or if the field is readonly, the function will assert.
T | Type of the field. |
index | The field index. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Skip current table.
This indicates to the query that the data in the current table is not modified. By default, iterating a table with a query will mark the iterated components as dirty if they are annotated with InOut or Out.
When this operation is invoked, the components of the current table will not be marked dirty.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |