22 type() : world_(
nullptr), type_(
nullptr) { }
24 type(world_t *
world,
const type_t *t)
51 ecs_assert(type_ != NULL, ECS_INVALID_PARAMETER, NULL);
52 ecs_assert(type_->count > index, ECS_OUT_OF_RANGE, NULL);
56 return flecs::id(world_, type_->array[index]);
59 const flecs::id_t* begin()
const {
60 if (type_ && type_->
count) {
67 const flecs::id_t* end()
const {
68 if (type_ && type_->count) {
69 return &type_->array[type_->count];
76 operator const type_t*()
const {
#define ecs_assert(condition, error_code,...)
Assert.
flecs::id_t * array() const
Return pointer to array.
int32_t count() const
Return number of ids in type.
flecs::string str() const
Convert type to comma-separated string.
flecs::id get(int32_t index) const
Get id at specified index in type.
char * ecs_type_str(const ecs_world_t *world, const ecs_type_t *type)
Convert type to string.
ecs_id_t * array
Array with ids.
int32_t count
Number of elements in array.
Class that wraps around a flecs::id_t.