Meta addon

Structures

ecs_array_desc_tUsed with ecs_array_init.
ecs_bitmask_constant_t
ecs_bitmask_desc_tUsed with ecs_bitmask_init.
ecs_enum_constant_t
ecs_enum_desc_tUsed with ecs_enum_init.
ecs_member_t
ecs_meta_cursor_tType that enables iterating/populating a value using reflection data
ecs_meta_scope_t
ecs_meta_type_op_t
ecs_primitive_desc_tAPI functions for creating meta types Used with ecs_primitive_init.
ecs_struct_desc_tUsed with ecs_struct_init.
ecs_unit_desc_tUsed with ecs_unit_init.
ecs_unit_prefix_desc_tUsed with ecs_unit_prefix_init.
ecs_unit_translation_tUnits
ecs_vector_desc_tUsed with ecs_vector_init.
EcsArray
EcsBitmask
EcsEnum
EcsMember
EcsMetaTypeComponent that is automatically added to every type with the right kind.
EcsMetaTypeSerialized
EcsPrimitive
EcsStruct
EcsUnit
EcsUnitPrefix
EcsVector

Functions

ecs_array_initCreate a new array type
ecs_bitmask_initCreate a new bitmask type
ecs_enum_initCreate a new enum type
ecs_id overloadMeta module component ids
ecs_id overloadPrimitive type component ids
ecs_meta_cursor
ecs_meta_elemMove cursor to a element
ecs_meta_get_boolFunctions for getting members
ecs_meta_get_charGet field value as char.
ecs_meta_get_entityGet field value as entity
ecs_meta_get_floatGet field value as float.
ecs_meta_get_intGet field value as signed integer.
ecs_meta_get_memberGet member name of current member
ecs_meta_get_ptrGet pointer to current field
ecs_meta_get_stringGet field value as string
ecs_meta_get_typeGet type of current element.
ecs_meta_get_uintGet field value as unsigned integer.
ecs_meta_get_unitGet unit of current element.
ecs_meta_is_collectionIs the current scope a collection?
ecs_meta_memberMove cursor to member
ecs_meta_nextMove cursor to next field
ecs_meta_popPop a struct or collection scope (must follow a push)
ecs_meta_pushPush a scope (required/only valid for structs & collections)
ecs_meta_set_boolThe set functions assign the field with the specified value
ecs_meta_set_charSet field with char value
ecs_meta_set_entitySet field with entity value
ecs_meta_set_floatSet field with float value
ecs_meta_set_intSet field with int value
ecs_meta_set_nullSet field with null value
ecs_meta_set_stringSet field with string value
ecs_meta_set_string_literalSet field with string literal value (has enclosing "")
ecs_meta_set_uintSet field with uint value
ecs_primitive_initCreate a new primitive type
ecs_quantity_initCreate a new quantity
ecs_struct_initCreate a new struct type
ecs_unit_initCreate a new unit
ecs_unit_prefix_initCreate a new unit prefix
ecs_vector_initCreate a new vector type
FlecsMetaImport

Enums

ecs_type_kind_tType kinds supported by reflection type system
ecs_primitive_kind_t
ecs_meta_type_op_kind_tSerializer utilities

Defines

Defines (meta.h)

FLECS_META_H

ECS_MEMBER_DESC_CACHE_SIZE (32)

ECS_META_MAX_SCOPE_DEPTH (32) /* >32 levels of nesting is not sane */

Deserializer utilities

ecs_primitive(world,...)
ecs_primitive_init(world, &(ecs_primitive_desc_t) __VA_ARGS__ )

ecs_enum(world,...)
ecs_enum_init(world, &(ecs_enum_desc_t) __VA_ARGS__ )

ecs_bitmask(world,...)
ecs_bitmask_init(world, &(ecs_bitmask_desc_t) __VA_ARGS__ )

ecs_array(world,...)
ecs_array_init(world, &(ecs_array_desc_t) __VA_ARGS__ )

ecs_vector(world,...)
ecs_vector_init(world, &(ecs_vector_desc_t) __VA_ARGS__ )

ecs_struct(world,...)
ecs_struct_init(world, &(ecs_struct_desc_t) __VA_ARGS__ )

ecs_unit(world,...)
ecs_unit_init(world, &(ecs_unit_desc_t) __VA_ARGS__ )

ecs_unit_prefix(world,...)
ecs_unit_prefix_init(world, &(ecs_unit_prefix_desc_t) __VA_ARGS__ )

ecs_quantity(world,...)
ecs_quantity_init(world, &(ecs_entity_desc_t) __VA_ARGS__ )

Typedefs

Typedefs (meta.h)

typedef bool ecs_bool_t

Primitive type definitions. These typedefs allow the builtin primitives to be used as regular components: ecs_set(world, e, ecs_i32_t, {10});

Or a more useful example (create an enum constant with a manual value): ecs_set_pair_object(world, e, EcsConstant, ecs_i32_t, {10});

typedef char ecs_char_t

typedef unsigned char ecs_byte_t

typedef uint8_t ecs_u8_t

typedef uint16_t ecs_u16_t

typedef uint32_t ecs_u32_t

typedef uint64_t ecs_u64_t

typedef uintptr_t ecs_uptr_t

typedef int8_t ecs_i8_t

typedef int16_t ecs_i16_t

typedef int32_t ecs_i32_t

typedef int64_t ecs_i64_t

typedef intptr_t ecs_iptr_t

typedef float ecs_f32_t

typedef double ecs_f64_t

typedef char * ecs_string_t

Variables

Variables (meta.h)

FLECS_API const ecs_entity_t EcsConstant

FLECS_API const ecs_entity_t EcsQuantity