![]() |
Flecs v3.2
A fast entity component system (ECS) for C & C++
|
Functions | |
ecs_world_t * | ecs_init (void) |
Create a new world. More... | |
ecs_world_t * | ecs_mini (void) |
Create a new world with just the core module. More... | |
ecs_world_t * | ecs_init_w_args (int argc, char *argv[]) |
Create a new world with arguments. More... | |
int | ecs_fini (ecs_world_t *world) |
Delete a world. More... | |
bool | ecs_is_fini (const ecs_world_t *world) |
Returns whether the world is being deleted. More... | |
void | ecs_atfini (ecs_world_t *world, ecs_fini_action_t action, void *ctx) |
Register action to be executed when world is destroyed. More... | |
void ecs_atfini | ( | ecs_world_t * | world, |
ecs_fini_action_t | action, | ||
void * | ctx | ||
) |
Register action to be executed when world is destroyed.
Fini actions are typically used when a module needs to clean up before a world shuts down.
world | The world. |
action | The function to execute. |
ctx | Userdata to pass to the function |
int ecs_fini | ( | ecs_world_t * | world | ) |
Delete a world.
This operation deletes the world, and everything it contains.
world | The world to delete. |
ecs_world_t * ecs_init | ( | void | ) |
Create a new world.
This operation automatically imports modules from addons Flecs has been built with, except when the module specifies otherwise.
ecs_world_t * ecs_init_w_args | ( | int | argc, |
char * | argv[] | ||
) |
Create a new world with arguments.
Same as ecs_init, but allows passing in command line arguments. Command line arguments are used to:
bool ecs_is_fini | ( | const ecs_world_t * | world | ) |
Returns whether the world is being deleted.
This operation can be used in callbacks like type hooks or observers to detect if they are invoked while the world is being deleted.
world | The world. |
ecs_world_t * ecs_mini | ( | void | ) |
Create a new world with just the core module.
Same as ecs_init, but doesn't import modules from addons. This operation is faster than ecs_init and results in less memory utilization.