31 , is_shared_(is_shared) {}
41 "invalid usage of [] operator for shared component field");
42 ecs_assert(index < count_, ECS_COLUMN_INDEX_OUT_OF_RANGE,
43 "index %d out of range for field", index);
44 return ECS_OFFSET(data_, size_ * index);
62 static_assert(std::is_empty<T>::value ==
false,
63 "invalid type for field, cannot iterate empty type");
74 , is_shared_(is_shared) {}
#define ecs_assert(condition, error_code,...)
Assert.
Wrapper class around a field.
T * operator->() const
Return first element of component array.
field(iter &iter, int field)
Create field from iterator.
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.
Class for iterating over query results.
Unsafe wrapper class around a field.
void * operator[](size_t index) const
Return element in component array.