19 table() : world_(
nullptr), table_(
nullptr) { }
66 int32_t
type_index(flecs::entity_t first, flecs::entity_t second)
const {
75 template <
typename First>
85 template <
typename First,
typename Second>
104 template <
typename T>
114 int32_t
column_index(flecs::entity_t first, flecs::entity_t second)
const {
123 template <
typename First>
133 template <
typename First,
typename Second>
143 bool has(flecs::id_t
id)
const {
152 template <
typename T>
154 return type_index<T>() != -1;
163 bool has(flecs::entity_t first, flecs::entity_t second)
const {
173 template <
typename First>
174 bool has(flecs::entity_t second)
const {
175 return type_index<First>(second) != -1;
184 template <
typename First,
typename Second>
186 return type_index<First, Second>() != -1;
203 void*
get(flecs::id_t
id)
const {
217 void*
get(flecs::entity_t first, flecs::entity_t second)
const {
218 return get(ecs_pair(first, second));
226 template <typename T, if_t< is_actual<T>::value > = 0>
236 template <typename T, if_t< is_enum<T>::value > = 0>
246 template <
typename T,
typename A = actual_type_t<T>,
247 if_t< flecs::is_pair<T>::value > = 0>
258 template <
typename First>
259 First*
get(flecs::entity_t second)
const {
269 template <
typename First,
typename Second,
typename P = flecs::pair<First, Second>,
270 typename A = actual_type_t<P>, if_not_t< flecs::is_pair<First>::value> = 0>
285 int32_t
depth(flecs::entity_t rel) {
294 template <
typename Rel>
308 operator table_t*()
const {
328 int32_t offset()
const {
332 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.
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.
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.
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 * 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.
First * get(flecs::entity_t second) const
Get pointer to component array by pair.
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 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 depth()
Get depth for given relationship.
int32_t type_index() const
Find type index for type.
int32_t column_index() const
Find column index for pair.
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.
bool has() const
Test if table has the pair.
int32_t depth(flecs::entity_t rel)
Get depth for given relationship.
table_t * get_table() const
Get table.
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.
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.
size_t column_size(int32_t index)
Get column size.
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.