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