forked from SanderMertens/flecs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iter.h
53 lines (40 loc) · 1.02 KB
/
iter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* @file iter.h
* @brief Iterator utilities.
*/
#ifndef FLECS_ITER_H
#define FLECS_ITER_H
void flecs_iter_init(
const ecs_world_t *world,
ecs_iter_t *it,
ecs_flags8_t fields);
void flecs_iter_validate(
ecs_iter_t *it);
void flecs_iter_populate_data(
ecs_world_t *world,
ecs_iter_t *it,
ecs_table_t *table,
int32_t offset,
int32_t count,
void **ptrs);
bool flecs_iter_next_row(
ecs_iter_t *it);
bool flecs_iter_next_instanced(
ecs_iter_t *it,
bool result);
void* flecs_iter_calloc(
ecs_iter_t *it,
ecs_size_t size,
ecs_size_t align);
#define flecs_iter_calloc_t(it, T)\
flecs_iter_calloc(it, ECS_SIZEOF(T), ECS_ALIGNOF(T))
#define flecs_iter_calloc_n(it, T, count)\
flecs_iter_calloc(it, ECS_SIZEOF(T) * count, ECS_ALIGNOF(T))
void flecs_iter_free(
void *ptr,
ecs_size_t size);
#define flecs_iter_free_t(ptr, T)\
flecs_iter_free(ptr, ECS_SIZEOF(T))
#define flecs_iter_free_n(ptr, T, count)\
flecs_iter_free(ptr, ECS_SIZEOF(T) * count)
#endif