Flecs v4.0
A fast entity component system (ECS) for C & C++
|
Wrapper class around a field. More...
#include <field.hpp>
Public Member Functions | |
field (T *array, size_t count, bool is_shared=false) | |
Create field from component array. | |
field (iter &iter, int field) | |
Create field from iterator. | |
T & | operator[] (size_t index) const |
Return element in component array. | |
T & | operator* () const |
Return first element of component array. | |
T * | operator-> () const |
Return first element of component array. | |
Protected Attributes | |
T * | data_ |
size_t | count_ |
bool | is_shared_ |
Wrapper class around a field.
T | component type of the field. |
|
inline |
flecs::field< T >::field | ( | iter & | iter, |
int | field ) |
Create field from iterator.
iter | Iterator object. |
field | Index of the signature of the query being iterated over. |
T & flecs::field< T >::operator* | ( | ) | const |
T * flecs::field< T >::operator-> | ( | ) | const |
T & flecs::field< T >::operator[] | ( | size_t | index | ) | const |
|
protected |
|
protected |
|
protected |