Flecs v3.2
A fast entity component system (ECS) for C & C++
No Matches
system.h File Reference

System module. More...

Go to the source code of this file.


struct  EcsTickSource
 Component used to provide a tick source to systems. More...
struct  ecs_system_desc_t
 Use with ecs_system_init() More...


#define ECS_SYSTEM_DECLARE(id)   ecs_entity_t ecs_id(id)
 Forward declare a system.
#define ECS_SYSTEM_DEFINE(world, id_, phase, ...)
 Define a forward declared system.
#define ECS_SYSTEM(world, id, phase, ...)
 Declare & define a system.
#define ecs_system(world, ...)    ecs_system_init(world, &(ecs_system_desc_t) __VA_ARGS__ )
 Shorthand for creating a system with ecs_system_init().


typedef struct EcsTickSource EcsTickSource
 Component used to provide a tick source to systems.
typedef struct ecs_system_desc_t ecs_system_desc_t
 Use with ecs_system_init()


FLECS_API ecs_entity_t ecs_system_init (ecs_world_t *world, const ecs_system_desc_t *desc)
 Create a system.
FLECS_API ecs_entity_t ecs_run (ecs_world_t *world, ecs_entity_t system, ecs_ftime_t delta_time, void *param)
 Run a specific system manually.
FLECS_API ecs_entity_t ecs_run_worker (ecs_world_t *world, ecs_entity_t system, int32_t stage_current, int32_t stage_count, ecs_ftime_t delta_time, void *param)
 Same as ecs_run(), but subdivides entities across number of provided stages.
FLECS_API ecs_entity_t ecs_run_w_filter (ecs_world_t *world, ecs_entity_t system, ecs_ftime_t delta_time, int32_t offset, int32_t limit, void *param)
 Run system with offset/limit and type filter.
FLECS_API ecs_query_tecs_system_get_query (const ecs_world_t *world, ecs_entity_t system)
 Get the query object for a system.
FLECS_API void * ecs_system_get_ctx (const ecs_world_t *world, ecs_entity_t system)
 Get system context.
FLECS_API void * ecs_system_get_binding_ctx (const ecs_world_t *world, ecs_entity_t system)
 Get system binding context.
FLECS_API void FlecsSystemImport (ecs_world_t *world)

Detailed Description

System module.

The system module allows for creating and running systems. A system is a query in combination with a callback function. In addition systems have support for time management and can be monitored by the stats addon.

Definition in file system.h.