31 , is_shared_(is_shared) {}
41 "invalid usage of [] operator for shared component field");
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.
#define ECS_INVALID_PARAMETER
Invalid parameter error code.
#define ECS_COLUMN_INDEX_OUT_OF_RANGE
Column index out of range error code.
Array class (primary template, disabled).
Wrapper class around a field.
T * operator->() const
Return the first element of the component array.
field(iter &iter, int field)
Create a field from an iterator.
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.
Unsafe wrapper class around a field.
void * operator[](size_t index) const
Return an element in the component array.