Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
Table sorting

Convenience macro's for sorting tables. More...

Collaboration diagram for Table sorting:

Macros

#define ecs_sort_table(id)   ecs_id(id##_sort_table)
 
#define ecs_compare(id)   ecs_id(id##_compare_fn)
 
#define ECS_SORT_TABLE_WITH_COMPARE(id, op_name, compare_fn, ...)
 
#define ECS_SORT_TABLE(id, ...)    ECS_SORT_TABLE_WITH_COMPARE(id, ecs_sort_table(id), ecs_compare(id), __VA_ARGS__)
 
#define ECS_COMPARE(id, ...)
 

Detailed Description

Convenience macro's for sorting tables.

Macro Definition Documentation

◆ ecs_compare

#define ecs_compare ( id)    ecs_id(id##_compare_fn)

Definition at line 752 of file flecs_c.h.

◆ ECS_COMPARE

#define ECS_COMPARE ( id,
... )
Value:
int ecs_compare(id)(ecs_entity_t e1, const void* ptr1, ecs_entity_t e2, const void* ptr2) { \
__VA_ARGS__ \
}
ecs_id_t ecs_entity_t
An entity identifier.
Definition flecs.h:347

Definition at line 860 of file flecs_c.h.

◆ ecs_sort_table

#define ecs_sort_table ( id)    ecs_id(id##_sort_table)

Definition at line 750 of file flecs_c.h.

◆ ECS_SORT_TABLE

#define ECS_SORT_TABLE ( id,
... )    ECS_SORT_TABLE_WITH_COMPARE(id, ecs_sort_table(id), ecs_compare(id), __VA_ARGS__)

Definition at line 847 of file flecs_c.h.

◆ ECS_SORT_TABLE_WITH_COMPARE

#define ECS_SORT_TABLE_WITH_COMPARE ( id,
op_name,
compare_fn,
... )

Definition at line 777 of file flecs_c.h.