Flecs v3.2
A fast entity component system (ECS) for C & C++
No Matches
Go to the documentation of this file.
6#pragma once
8namespace flecs {
18/* Primitive type aliases */
19using bool_t = ecs_bool_t;
20using char_t = ecs_char_t;
21using u8_t = ecs_u8_t;
22using u16_t = ecs_u16_t;
23using u32_t = ecs_u32_t;
24using u64_t = ecs_u64_t;
25using uptr_t = ecs_uptr_t;
26using i8_t = ecs_i8_t;
27using i16_t = ecs_i16_t;
28using i32_t = ecs_i32_t;
29using i64_t = ecs_i64_t;
30using iptr_t = ecs_iptr_t;
31using f32_t = ecs_f32_t;
32using f64_t = ecs_f64_t;
34/* Embedded type aliases */
35using member_t = ecs_member_t;
36using enum_constant_t = ecs_enum_constant_t;
37using bitmask_constant_t = ecs_bitmask_constant_t;
39/* Components */
40using MetaType = EcsMetaType;
41using MetaTypeSerialized = EcsMetaTypeSerialized;
42using Primitive = EcsPrimitive;
43using Enum = EcsEnum;
44using Bitmask = EcsBitmask;
45using Member = EcsMember;
46using MemberRanges = EcsMemberRanges;
47using Struct = EcsStruct;
48using Array = EcsArray;
49using Vector = EcsVector;
50using Unit = EcsUnit;
53struct bitmask {
54 uint32_t value;
57/* Handles to builtin reflection types */
58static const flecs::entity_t Bool = ecs_id(ecs_bool_t);
59static const flecs::entity_t Char = ecs_id(ecs_char_t);
60static const flecs::entity_t Byte = ecs_id(ecs_byte_t);
61static const flecs::entity_t U8 = ecs_id(ecs_u8_t);
62static const flecs::entity_t U16 = ecs_id(ecs_u16_t);
63static const flecs::entity_t U32 = ecs_id(ecs_u32_t);
64static const flecs::entity_t U64 = ecs_id(ecs_u64_t);
65static const flecs::entity_t Uptr = ecs_id(ecs_uptr_t);
66static const flecs::entity_t I8 = ecs_id(ecs_i8_t);
67static const flecs::entity_t I16 = ecs_id(ecs_i16_t);
68static const flecs::entity_t I32 = ecs_id(ecs_i32_t);
69static const flecs::entity_t I64 = ecs_id(ecs_i64_t);
70static const flecs::entity_t Iptr = ecs_id(ecs_iptr_t);
71static const flecs::entity_t F32 = ecs_id(ecs_f32_t);
72static const flecs::entity_t F64 = ecs_id(ecs_f64_t);
73static const flecs::entity_t String = ecs_id(ecs_string_t);
74static const flecs::entity_t Entity = ecs_id(ecs_entity_t);
75static const flecs::entity_t Constant = EcsConstant;
76static const flecs::entity_t Quantity = EcsQuantity;
78namespace meta {
80/* Type kinds supported by reflection system */
81using type_kind_t = ecs_type_kind_t;
82static const type_kind_t PrimitiveType = EcsPrimitiveType;
83static const type_kind_t BitmaskType = EcsBitmaskType;
84static const type_kind_t EnumType = EcsEnumType;
85static const type_kind_t StructType = EcsStructType;
86static const type_kind_t ArrayType = EcsArrayType;
87static const type_kind_t VectorType = EcsVectorType;
88static const type_kind_t CustomType = EcsOpaqueType;
89static const type_kind_t TypeKindLast = EcsTypeKindLast;
91/* Primitive type kinds supported by reflection system */
92using primitive_kind_t = ecs_primitive_kind_t;
93static const primitive_kind_t Bool = EcsBool;
94static const primitive_kind_t Char = EcsChar;
95static const primitive_kind_t Byte = EcsByte;
96static const primitive_kind_t U8 = EcsU8;
97static const primitive_kind_t U16 = EcsU16;
98static const primitive_kind_t U32 = EcsU32;
99static const primitive_kind_t U64 = EcsU64;
100static const primitive_kind_t I8 = EcsI8;
101static const primitive_kind_t I16 = EcsI16;
102static const primitive_kind_t I32 = EcsI32;
103static const primitive_kind_t I64 = EcsI64;
104static const primitive_kind_t F32 = EcsF32;
105static const primitive_kind_t F64 = EcsF64;
106static const primitive_kind_t UPtr = EcsUPtr;
107static const primitive_kind_t IPtr = EcsIPtr;
108static const primitive_kind_t String = EcsString;
109static const primitive_kind_t Entity = EcsEntity;
110static const primitive_kind_t PrimitiveKindLast = EcsPrimitiveKindLast;
114namespace _ {
116void init(flecs::world& world);
118} // namespace _
119} // namespace meta
120} // namespace flecs
122#include "cursor.hpp"
123#include "opaque.hpp"
struct EcsMember EcsMember
Component added to member entities.
struct EcsPrimitive EcsPrimitive
Component added to primitive types.
bool ecs_bool_t
Primitive type definitions.
Definition meta.h:95
struct EcsEnum EcsEnum
Component added to enum type entities.
struct EcsStruct EcsStruct
Component added to struct type entities.
struct ecs_member_t ecs_member_t
Element type of members vector in EcsStruct.
struct EcsVector EcsVector
Component added to vector type entities.
struct EcsBitmask EcsBitmask
Component added to bitmask type entities.
Primitive type kinds supported by meta addon.
Definition meta.h:169
struct EcsArray EcsArray
Component added to array type entities.
struct EcsMetaType EcsMetaType
Component that is automatically added to every type with the right kind.
Type kinds supported by meta addon.
Definition meta.h:150
struct EcsMemberRanges EcsMemberRanges
Component added to member entities to express valid value ranges.
ecs_id_t ecs_entity_t
An entity identifier.
Definition flecs.h:305
Helpers for opaque type registration.
Base type for bitmasks.
Definition decl.hpp:53
The world.
Definition world.hpp:132