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

System module. More...

Go to the source code of this file.

Classes

struct  EcsTickSource
 Component used to provide a tick source to systems. More...
 
struct  ecs_system_desc_t
 Use with ecs_system_init() to create or update a system. More...
 
struct  ecs_system_t
 System type, get with ecs_system_get() More...
 

Macros

#define FLECS_SYSTEM_H
 
#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().
 

Typedefs

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() to create or update a system.
 
typedef struct ecs_system_t ecs_system_t
 System type, get with ecs_system_get()
 

Functions

FLECS_API ecs_entity_t ecs_system_init (ecs_world_t *world, const ecs_system_desc_t *desc)
 Create a system.
 
FLECS_API const ecs_system_tecs_system_get (const ecs_world_t *world, ecs_entity_t system)
 Get system object.
 
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 void FlecsSystemImport (ecs_world_t *world)
 System module import function.
 

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.