13 *
this = iter.field<T>(index);
18 ecs_assert(data_ !=
nullptr, ECS_INVALID_OPERATION,
19 "invalid nullptr dereference of component type %s",
21 ecs_assert(index < count_, ECS_COLUMN_INDEX_OUT_OF_RANGE,
22 "index %d out of range for array of component type %s",
23 index, _::type_name<T>());
24 ecs_assert(!index || !is_shared_, ECS_INVALID_PARAMETER,
25 "non-zero index invalid for shared field of component type %s",
37 ecs_assert(data_ !=
nullptr, ECS_INVALID_OPERATION,
38 "invalid nullptr dereference of component type %s",
50 ecs_assert(data_ !=
nullptr, ECS_INVALID_OPERATION,
51 "invalid nullptr dereference of component type %s",
53 ecs_assert(data_ !=
nullptr, ECS_INVALID_OPERATION,
54 "-> operator invalid for array with >1 element of "
55 "component type %s, use [row] instead",
#define ecs_assert(condition, error_code,...)
Assert.
T * operator->() const
Return first element of component array.
T & operator*() const
Return first element of component array.
field(T *array, size_t count, bool is_shared=false)
Create field from component array.
T & operator[](size_t index) const
Return element in component array.