29 "invalid nullptr dereference of component type %s",
32 "index %d out of range for array of component type %s",
33 index, _::type_name<T>());
35 "non-zero index invalid for shared field of component type %s",
48 "invalid nullptr dereference of component type %s",
61 "invalid nullptr dereference of component type %s",
64 "-> operator invalid for an array with >1 element of "
65 "component type %s, use [row] instead",
71inline base_field<T>::base_field(
iter &
iter, int32_t index) {
76T& base_field<T>::operator[](
size_t index)
const {
78 "invalid nullptr dereference of component type %s",
81 "index %d out of range for array of component type %s",
82 index, _::type_name<T>());
84 "non-zero index invalid for shared field of component type %s",
86 return *
static_cast<T*
>(ECS_OFFSET(data_, index * stride_));
90T& base_field<T>::operator*()
const {
92 "invalid nullptr dereference of component type %s",
98T* base_field<T>::operator->()
const {
100 "invalid nullptr dereference of component type %s",
#define ecs_assert(condition, error_code,...)
Assert.
#define ECS_INVALID_OPERATION
Invalid operation error code.
#define ECS_INVALID_PARAMETER
Invalid parameter error code.
#define ECS_COLUMN_INDEX_OUT_OF_RANGE
Column index out of range error code.
T * operator->() const
Return the first element of the component array.
T & operator*() const
Return the first element of the component array.
field(T *array, size_t count, bool is_shared=false)
Create a field from a component array.
T & operator[](size_t index) const
Return an element in the component array.
Class for iterating over query results.
flecs::field< A > field(int8_t index) const
Get read-only access to field data.
flecs::base_field< A > base_field(int8_t index) const
Get access to a field matched through component inheritance.