19 table() : world_(
nullptr), table_(
nullptr) { }
81 int32_t
type_index(flecs::entity_t first, flecs::entity_t second)
const {
90 template <
typename First>
100 template <
typename First,
typename Second>
119 template <
typename T>
129 int32_t
column_index(flecs::entity_t first, flecs::entity_t second)
const {
138 template <
typename First>
148 template <
typename First,
typename Second>
158 bool has(flecs::id_t
id)
const {
167 template <
typename T>
169 return type_index<T>() != -1;
178 bool has(flecs::entity_t first, flecs::entity_t second)
const {
188 template <
typename First>
189 bool has(flecs::entity_t second)
const {
190 return type_index<First>(second) != -1;
199 template <
typename First,
typename Second>
201 return type_index<First, Second>() != -1;
218 void*
get(flecs::id_t
id)
const {
232 void*
get(flecs::entity_t first, flecs::entity_t second)
const {
233 return get(ecs_pair(first, second));
241 template <typename T, if_t< is_actual<T>::value > = 0>
251 template <typename T, if_t< is_enum<T>::value > = 0>
261 template <
typename T,
typename A = actual_type_t<T>,
262 if_t< flecs::is_pair<T>::value > = 0>
273 template <
typename First>
274 First*
get(flecs::entity_t second)
const {
284 template <
typename First,
typename Second,
typename P = flecs::pair<First, Second>,
285 typename A = actual_type_t<P>, if_not_t< flecs::is_pair<First>::value> = 0>
300 int32_t
depth(flecs::entity_t rel)
const {
309 template <
typename Rel>
316 return flecs_table_records(table_);
320 uint64_t
id()
const {
321 return flecs_table_id(table_);
348 operator table_t*()
const {
368 int32_t offset()
const {
372 int32_t count()
const {
char * ecs_table_str(const ecs_world_t *world, const ecs_table_t *table)
Convert table to string.
const ecs_type_t * ecs_table_get_type(const ecs_table_t *table)
Get type for table.
int32_t ecs_table_size(const ecs_table_t *table)
Returns allocated size of table.
bool ecs_table_has_flags(ecs_table_t *table, ecs_flags32_t flags)
Test table for flags.
void * ecs_table_get_column(const ecs_table_t *table, int32_t index, int32_t offset)
Get column from table by column index.
int32_t ecs_table_count(const ecs_table_t *table)
Returns the number of entities in the table.
const ecs_entity_t * ecs_table_entities(const ecs_table_t *table)
Returns array with entity ids for table.
void ecs_table_unlock(ecs_world_t *world, ecs_table_t *table)
Unlock a table.
int32_t ecs_table_get_depth(const ecs_world_t *world, const ecs_table_t *table, ecs_entity_t rel)
Return depth for table in tree for relationship rel.
int32_t ecs_table_get_column_index(const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
Get column index for id.
void ecs_table_lock(ecs_world_t *world, ecs_table_t *table)
Lock a table.
int32_t ecs_table_get_type_index(const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
Get type index for id.
size_t ecs_table_get_column_size(const ecs_table_t *table, int32_t index)
Get column size from table.
void ecs_table_clear_entities(ecs_world_t *world, ecs_table_t *table)
Remove all entities in a table.
void * get_column(int32_t index) const override
Get pointer to component array by column index.
T * get() const
Get pointer to component array by component.
int32_t type_index(flecs::entity_t first, flecs::entity_t second) const
Find type index for pair.
int32_t depth() const
Get depth for given relationship.
First * get(flecs::entity_t second) const
Get pointer to component array by pair.
uint64_t id() const
Get table id.
flecs::string str() const
Convert table type to string.
int32_t column_index(flecs::id_t id) const
Find column index for (component) id.
bool has(flecs::id_t id) const
Test if table has (component) id.
int32_t type_index() const
Find type index for pair.
int32_t depth(flecs::entity_t rel) const
Get depth for given relationship.
int32_t count() const
Get table count.
bool has(flecs::entity_t second) const
Test if table has the pair.
void * get(flecs::id_t id) const
Get pointer to component array by component.
int32_t type_index() const
Find type index for type.
int32_t column_index() const
Find column index for pair.
bool has_flags(ecs_flags32_t flags) const
Check if table has flags.
const flecs::entity_t * entities() const
Get array with entity ids.
bool has(flecs::entity_t first, flecs::entity_t second) const
Test if table has the pair.
A * get() const
Get pointer to component array by pair.
void * get(flecs::entity_t first, flecs::entity_t second) const
Get pointer to component array by pair.
int32_t column_index(flecs::entity_t second) const
Find column index for pair.
bool has() const
Test if table has the type.
void lock() const
Lock table.
bool has() const
Test if table has the pair.
table_t * get_table() const
Get table.
size_t column_size(int32_t index) const
Get column size.
int32_t type_index(flecs::id_t id) const
Find type index for (component) id.
int32_t column_index() const
Find column index for type.
void clear_entities() const
Delete entities in table.
flecs::type type() const
Get table type.
int32_t column_index(flecs::entity_t first, flecs::entity_t second) const
Find column index for pair.
int32_t size() const
Get number of allocated elements in table.
ecs_table_records_t records() const
Get table records array.
void unlock() const
Unlock table.
A * get() const
Get pointer to component array by component.
virtual void * get_column(int32_t index) const
Get pointer to component array by column index.
int32_t type_index(flecs::entity_t second) const
Find type index for pair.