Flecs: Table sorting
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.0 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
Table sorting
C API » Macro API

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

Collaboration diagram for Table sorting:

## Macros
#define | ecs_sort_table(id)
#define | ecs_compare(id)
#define | ECS_SORT_TABLE_WITH_COMPARE(id, op_name, compare_fn, ...)
#define | ECS_SORT_TABLE(id, ...)
#define | ECS_COMPARE(id, ...)

## Detailed Description

Convenience macro's for sorting tables.

## Macro Definition Documentation

## ◆ 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_entity_t
ecs_id_t ecs_entity_t
An entity identifier.
Definition flecs.h:361

Definition at line 836 of file flecs_c.h.

## ◆ ecs_compare

#define ecs_compare | ( |  | id | ) |

Value:
ecs_id(id##_compare_fn)
ecs_id
FLECS_API const ecs_entity_t ecs_id(EcsDocDescription)
Component id for EcsDocDescription.

Definition at line 728 of file flecs_c.h.

## ◆ ECS_SORT_TABLE

#define ECS_SORT_TABLE | ( |  | id,
|  |  | ... )

Value:
ECS_SORT_TABLE_WITH_COMPARE(id, ecs_sort_table(id), ecs_compare(id), __VA_ARGS__)

Definition at line 823 of file flecs_c.h.

## ◆ ecs_sort_table

#define ecs_sort_table | ( |  | id | ) |

Value:
ecs_id(id##_sort_table)

Definition at line 726 of file flecs_c.h.

## ◆ ECS_SORT_TABLE_WITH_COMPARE

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

Definition at line 753 of file flecs_c.h.