23#define ECS_FUNC_NAME_FRONT(type, name) ((sizeof(#type) + sizeof(" flecs::_::() [T = ") + sizeof(#name)) - 3u)
24#define ECS_FUNC_NAME_BACK (sizeof("]") - 1u)
25#define ECS_FUNC_NAME __PRETTY_FUNCTION__
26#elif defined(__GNUC__)
27#define ECS_FUNC_NAME_FRONT(type, name) ((sizeof(#type) + sizeof(" flecs::_::() [with T = ") + sizeof(#name)) - 3u)
28#define ECS_FUNC_NAME_BACK (sizeof("]") - 1u)
29#define ECS_FUNC_NAME __PRETTY_FUNCTION__
31#define ECS_FUNC_NAME_FRONT(type, name) ((sizeof(#type) + sizeof(" __cdecl flecs::_::<") + sizeof(#name)) - 3u)
32#define ECS_FUNC_NAME_BACK (sizeof(">(void)") - 1u)
33#define ECS_FUNC_NAME __FUNCSIG__
35#error "implicit component registration not supported"
38#define ECS_FUNC_TYPE_LEN(type, name, str)\
39 (flecs::string::length(str) - (ECS_FUNC_NAME_FRONT(type, name) + ECS_FUNC_NAME_BACK))
52char* ecs_cpp_get_type_name(
54 const char *func_name,
66char* ecs_cpp_get_symbol_name(
70 const char *type_name,
83char* ecs_cpp_get_constant_name(
85 const char *func_name,
96const char* ecs_cpp_trim_module(
98 const char *type_name);
100typedef void (*ecs_cpp_type_action_t)(
104typedef struct ecs_cpp_component_desc_t {
108 const char *cpp_name;
109 const char *cpp_symbol;
112 ecs_cpp_type_action_t lifecycle_action;
113 ecs_cpp_type_action_t enum_action;
115 bool explicit_registration;
116} ecs_cpp_component_desc_t;
126 const ecs_cpp_component_desc_t *desc);
135void ecs_cpp_enum_init(
162typedef struct ecs_cpp_get_mut_t {
179FLECS_ALWAYS_INLINE ecs_cpp_get_mut_t ecs_cpp_set(
196FLECS_ALWAYS_INLINE ecs_cpp_get_mut_t ecs_cpp_assign(
218 const char *root_sep);
struct ecs_stage_t ecs_stage_t
A stage enables modification while iterating and from multiple threads.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
uint64_t ecs_id_t
IDs are the things that can be added to an entity.
Element type of members vector in EcsStruct.