|
| 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 | other_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 (int8_t index) const |
| Returns whether field is matched on self.
|
|
bool | is_set (int8_t index) const |
| Returns whether field is set.
|
|
bool | is_readonly (int8_t index) const |
| Returns whether field is readonly.
|
|
int32_t | field_count () const |
| Number of fields in iterator.
|
|
size_t | size (int8_t index) const |
| Size of field data type.
|
|
flecs::entity | src (int8_t index) const |
| Obtain field source (0 if This).
|
|
flecs::id | id (int8_t index) const |
| Obtain id matched for field.
|
|
flecs::id | pair (int8_t index) const |
| Obtain pair id matched for field.
|
|
int32_t | column_index (int8_t index) const |
| Obtain column index for field.
|
|
int8_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 (int8_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 (int8_t index) const |
| Get read/write access to field data.
|
|
flecs::untyped_field | field (int8_t index) const |
| Get unchecked access to field data.
|
|
void * | field_at (int8_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 (int8_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 (int8_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.
|
|
template<typename Func > |
void | targets (int8_t index, const Func &func) |
| Iterate targets for pair field.
|
|
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.
This function should not be used in each() callbacks, unless it is to access a shared field. For access to non-shared fields in each(), use field_at.
- Template Parameters
-
- Parameters
-
- Returns
- The field data.
Definition at line 68 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.
This function should not be used in each() callbacks, unless it is to access a shared field. For access to non-shared fields in each(), use field_at.
- Template Parameters
-
- Parameters
-
- Returns
- The field data.
Get unchecked access to field data.
Unchecked access is required when a system does not know the type of a field at compile time.
This function should not be used in each() callbacks, unless it is to access a shared field. For access to non-shared fields in each(), use field_at.
- Parameters
-
Definition at line 282 of file iter.hpp.
template<typename T , typename A = actual_type_t<T>, typename std::enable_if< std::is_const< T >::value, void >::type * = nullptr>
const A & flecs::iter::field_at |
( |
int8_t | index, |
|
|
size_t | row ) const |
|
inline |
Get reference to field at row.
This function may be used to access shared fields when row is set to 0.
Definition at line 305 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>
A & flecs::iter::field_at |
( |
int8_t | index, |
|
|
size_t | row ) const |
|
inline |
Get reference to field at row.
This function may be used to access shared fields when row is set to 0.
Definition at line 319 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 351 of file iter.hpp.