|
| iter (ecs_iter_t *it) |
| Construct iterator from C iterator object.
|
|
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.
|
|
template<typename T > |
T * | ctx () |
| Access ctx.
|
|
void * | param () |
| Access param.
|
|
template<typename T > |
T * | param () |
| Access param.
|
|
flecs::entity | entity (size_t row) const |
| Obtain mutable handle to entity being iterated over.
|
|
bool | is_self (int32_t index) const |
| Returns whether field is matched on self.
|
|
bool | is_set (int32_t index) const |
| Returns whether field is set.
|
|
bool | is_readonly (int32_t index) const |
| Returns whether field is readonly.
|
|
int32_t | field_count () const |
| Number of fields in iterator.
|
|
size_t | size (int32_t index) const |
| Size of field data type.
|
|
flecs::entity | src (int32_t index) const |
| Obtain field source (0 if This).
|
|
flecs::id | id (int32_t index) const |
| Obtain id matched for field.
|
|
flecs::id | pair (int32_t index) const |
| Obtain pair id matched for field.
|
|
int32_t | column_index (int32_t index) const |
| Obtain column index for field.
|
|
int32_t | term_index () const |
| Obtain term that triggered an observer.
|
|
flecs::string | str () const |
| Convert current iterator result to string.
|
|
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value, void >::type * = nullptr> |
flecs::field< A > | field (int32_t index) const |
| Get readonly access to field data.
|
|
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value==false, void >::type * = nullptr> |
flecs::field< A > | field (int32_t index) const |
| Get read/write access to field data.
|
|
flecs::untyped_field | field (int32_t index) const |
| Get unchecked access to field data.
|
|
void * | field_at (int32_t index, size_t row) const |
| Get pointer to field at row.
|
|
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value, void >::type * = nullptr> |
const A & | field_at (int32_t index, size_t row) const |
| Get reference to field at row.
|
|
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value==false, void >::type * = nullptr> |
A & | field_at (int32_t index, size_t row) const |
| Get reference to field at row.
|
|
flecs::field< const flecs::entity_t > | entities () const |
| Get readonly access to entity ids.
|
|
bool | changed () |
| Check if the current table has changed since the last iteration.
|
|
void | skip () |
| Skip current table.
|
|
uint64_t | group_id () const |
|
flecs::entity | get_var (int var_id) const |
| Get value of variable by id.
|
|
flecs::entity | get_var (const char *name) const |
| Get value of variable by name.
|
|
bool | next () |
| Progress iterator.
|
|
void | each () |
| Forward to each.
|
|
void | fini () |
| Free iterator resources.
|
|
flecs::string | to_json (flecs::iter_to_json_desc_t *desc=nullptr) |
| Serialize iterator result to JSON.
|
|
Class for iterating over query results.
Definition at line 68 of file iter.hpp.
template<typename T , typename A , typename std::enable_if< std::is_const< T >::value==false, void >::type * >
Get readonly access to field data.
If the specified field index does not match with the provided type, the function will assert.
- Template Parameters
-
- Parameters
-
- Returns
- The field data.
Definition at line 64 of file iter.hpp.
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value==false, void >::type * = nullptr>
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.
- Template Parameters
-
- Parameters
-
- Returns
- The field data.
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value==false, void >::type * = nullptr>
A & flecs::iter::field_at |
( |
int32_t | index, |
|
|
size_t | row ) const |
|
inline |
Get reference to field at row.
Definition at line 290 of file iter.hpp.
void flecs::iter::skip |
( |
| ) |
|
|
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.
Definition at line 318 of file iter.hpp.