![]() |
Flecs v4.0
A fast entity component system (ECS) for C & C++
|
Convenience macro's for creating entities, components and observers More...
Macros | |
| #define | ECS_DECLARE(id) |
| #define | ECS_ENTITY_DECLARE ECS_DECLARE |
| Forward declare an entity. | |
| #define | ECS_ENTITY_DEFINE(world, id_, ...) |
| Define a forward declared entity. | |
| #define | ECS_ENTITY(world, id, ...) |
| Declare & define an entity. | |
| #define | ECS_TAG_DECLARE ECS_DECLARE |
| Forward declare a tag. | |
| #define | ECS_TAG_DEFINE(world, id) |
| Define a forward declared tag. | |
| #define | ECS_TAG(world, id) |
| Declare & define a tag. | |
| #define | ECS_PREFAB_DECLARE ECS_DECLARE |
| Forward declare a prefab. | |
| #define | ECS_PREFAB_DEFINE(world, id, ...) |
| Define a forward declared prefab. | |
| #define | ECS_PREFAB(world, id, ...) |
| Declare & define a prefab. | |
| #define | ECS_COMPONENT_DECLARE(id) |
| Forward declare a component. | |
| #define | ECS_COMPONENT_DEFINE(world, id_) |
| Define a forward declared component. | |
| #define | ECS_COMPONENT(world, id) |
| Declare & define a component. | |
| #define | ECS_OBSERVER_DECLARE(id) |
| #define | ECS_OBSERVER_DEFINE(world, id_, kind, ...) |
| Define a forward declared observer. | |
| #define | ECS_OBSERVER(world, id, kind, ...) |
| Declare & define an observer. | |
| #define | ECS_QUERY_DECLARE(name) |
| #define | ECS_QUERY_DEFINE(world, name_, ...) |
| Define a forward declared observer. | |
| #define | ECS_QUERY(world, name, ...) |
| Declare & define an observer. | |
| #define | ecs_entity(world, ...) |
| Shorthand for creating an entity with ecs_entity_init(). | |
| #define | ecs_component(world, ...) |
| Shorthand for creating a component with ecs_component_init(). | |
| #define | ecs_component_t(world, T) |
| Shorthand for creating a component from a type. | |
| #define | ecs_query(world, ...) |
| Shorthand for creating a query with ecs_query_cache_init. | |
| #define | ecs_observer(world, ...) |
| Shorthand for creating an observer with ecs_observer_init(). | |
Convenience macro's for creating entities, components and observers
| #define ECS_COMPONENT | ( | world, | |
| id ) |
Declare & define a component.
Example:
| #define ecs_component | ( | world, | |
| ... ) |
Shorthand for creating a component with ecs_component_init().
Example:
| #define ECS_COMPONENT_DECLARE | ( | id | ) |
Forward declare a component.
| #define ECS_COMPONENT_DEFINE | ( | world, | |
| id_ ) |
Define a forward declared component.
Example:
| #define ecs_component_t | ( | world, | |
| T ) |
Shorthand for creating a component from a type.
Example:
| #define ECS_DECLARE | ( | id | ) |
| #define ECS_ENTITY | ( | world, | |
| id, | |||
| ... ) |
| #define ecs_entity | ( | world, | |
| ... ) |
Shorthand for creating an entity with ecs_entity_init().
Example:
| #define ECS_ENTITY_DECLARE ECS_DECLARE |
| #define ECS_ENTITY_DEFINE | ( | world, | |
| id_, | |||
| ... ) |
Define a forward declared entity.
Example:
| #define ECS_OBSERVER | ( | world, | |
| id, | |||
| kind, | |||
| ... ) |
Declare & define an observer.
Example:
| #define ecs_observer | ( | world, | |
| ... ) |
Shorthand for creating an observer with ecs_observer_init().
Example:
| #define ECS_OBSERVER_DECLARE | ( | id | ) |
| #define ECS_OBSERVER_DEFINE | ( | world, | |
| id_, | |||
| kind, | |||
| ... ) |
Define a forward declared observer.
Example:
| #define ECS_PREFAB | ( | world, | |
| id, | |||
| ... ) |
Declare & define a prefab.
Example:
| #define ECS_PREFAB_DECLARE ECS_DECLARE |
| #define ECS_PREFAB_DEFINE | ( | world, | |
| id, | |||
| ... ) |
Define a forward declared prefab.
Example:
| #define ECS_QUERY | ( | world, | |
| name, | |||
| ... ) |
Declare & define an observer.
Example:
| #define ecs_query | ( | world, | |
| ... ) |
Shorthand for creating a query with ecs_query_cache_init.
Example: ecs_query(world, { .terms = {{ ecs_id(Position) }} });
| #define ECS_QUERY_DECLARE | ( | name | ) |
| #define ECS_QUERY_DEFINE | ( | world, | |
| name_, | |||
| ... ) |
Define a forward declared observer.
Example:
| #define ECS_TAG | ( | world, | |
| id ) |
| #define ECS_TAG_DEFINE | ( | world, | |
| id ) |
Define a forward declared tag.
Example: