Flecs: Meta Utilities
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
Meta Utilities
C API » Addons

Macro utilities to automatically insert reflection data. More...

Collaboration diagram for Meta Utilities:

## Macros
#define | ECS_META_COMPONENT(world, name)
| Declare component with descriptor.
#define | ECS_STRUCT(name, ...)
| ECS_STRUCT(name, body).
#define | ECS_ENUM(name, ...)
| ECS_ENUM(name, body).
#define | ECS_BITMASK(name, ...)
| ECS_BITMASK(name, body).
#define | ECS_PRIVATE
| Macro used to mark part of type for which no reflection data is created.

## Functions
FLECS_API int | ecs_meta_from_desc (ecs_world_t *world, ecs_entity_t component, ecs_type_kind_t kind, const char *desc)
| Populate meta information from type descriptor.

## Detailed Description

Macro utilities to automatically insert reflection data.

## Macro Definition Documentation

## ◆ ECS_BITMASK

#define ECS_BITMASK | ( |  | name,
|  |  | ... )

Value:
ECS_META_IMPL_CALL(ECS_BITMASK_, ECS_META_IMPL, name, #__VA_ARGS__);\
ECS_ENUM_TYPE(name, __VA_ARGS__)

ECS_BITMASK(name, body).

Definition at line 56 of file meta_c.h.

## ◆ ECS_ENUM

#define ECS_ENUM | ( |  | name,
|  |  | ... )

Value:
ECS_META_IMPL_CALL(ECS_ENUM_, ECS_META_IMPL, name, #__VA_ARGS__);\
ECS_ENUM_TYPE(name, __VA_ARGS__)

ECS_ENUM(name, body).

Definition at line 51 of file meta_c.h.

## ◆ ECS_META_COMPONENT

#define ECS_META_COMPONENT | ( |  | world,
|  |  | name )

Value:
ECS_COMPONENT_DEFINE(world, name);\
ecs_meta_from_desc(world, ecs_id(name),\
FLECS__##name##_kind, FLECS__##name##_desc)
ecs_id
FLECS_API const ecs_entity_t ecs_id(EcsDocDescription)
Component id for EcsDocDescription.
ECS_COMPONENT_DEFINE
#define ECS_COMPONENT_DEFINE(world, id_)
Define a forward declared component.
Definition flecs_c.h:122

Declare component with descriptor.

Definition at line 40 of file meta_c.h.

## ◆ ECS_PRIVATE

#define ECS_PRIVATE

Macro used to mark part of type for which no reflection data is created.

Definition at line 61 of file meta_c.h.

## ◆ ECS_STRUCT

#define ECS_STRUCT | ( |  | name,
|  |  | ... )

Value:
ECS_META_IMPL_CALL(ECS_STRUCT_, ECS_META_IMPL, name, #__VA_ARGS__);\
ECS_STRUCT_TYPE(name, __VA_ARGS__)

ECS_STRUCT(name, body).

Definition at line 46 of file meta_c.h.