Flecs: include/flecs/addons/cpp/mixins/meta/decl.hpp Source File
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.1 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
decl.hpp
Go to the documentation of this file.
1
5
6#pragma once
7
8namespace flecs {
9
17
19 using 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;
33
35 using member_t = ecs_member_t;
36using enum_constant_t = ecs_enum_constant_t;
37using bitmask_constant_t = ecs_bitmask_constant_t;
38
40 using Type = EcsType;
41using TypeSerializer = EcsTypeSerializer;
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;
51
53 struct bitmask {
54 uint32_t value;
55};
56
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 Quantity = EcsQuantity;
76
77namespace meta {
78
80 using type_kind_t = ecs_type_kind_t;
81static const type_kind_t PrimitiveType = EcsPrimitiveType;
82static const type_kind_t BitmaskType = EcsBitmaskType;
83static const type_kind_t EnumType = EcsEnumType;
84static const type_kind_t StructType = EcsStructType;
85static const type_kind_t ArrayType = EcsArrayType;
86static const type_kind_t VectorType = EcsVectorType;
87static const type_kind_t CustomType = EcsOpaqueType;
88static const type_kind_t TypeKindLast = EcsTypeKindLast;
89
91 using primitive_kind_t = ecs_primitive_kind_t;
92static const primitive_kind_t Bool = EcsBool;
93static const primitive_kind_t Char = EcsChar;
94static const primitive_kind_t Byte = EcsByte;
95static const primitive_kind_t U8 = EcsU8;
96static const primitive_kind_t U16 = EcsU16;
97static const primitive_kind_t U32 = EcsU32;
98static const primitive_kind_t U64 = EcsU64;
99static const primitive_kind_t I8 = EcsI8;
100static const primitive_kind_t I16 = EcsI16;
101static const primitive_kind_t I32 = EcsI32;
102static const primitive_kind_t I64 = EcsI64;
103static const primitive_kind_t F32 = EcsF32;
104static const primitive_kind_t F64 = EcsF64;
105static const primitive_kind_t UPtr = EcsUPtr;
106static const primitive_kind_t IPtr = EcsIPtr;
107static const primitive_kind_t String = EcsString;
108static const primitive_kind_t Entity = EcsEntity;
109static const primitive_kind_t PrimitiveKindLast = EcsPrimitiveKindLast;
110
111using op_t = ecs_meta_op_t;
112
114
115namespace _ {
116
117void init(flecs::world& world);
118
119} // namespace _
120} // namespace meta
121} // namespace flecs
122
123#include "cursor.hpp"
124#include "opaque.hpp"
cursor.hpp
Cursor for reading/writing dynamic values.
ecs_id
FLECS_API const ecs_entity_t ecs_id(EcsDocDescription)
Component ID for EcsDocDescription.
ecs_bool_t
bool ecs_bool_t
Primitive type definitions.
Definition meta.h:95
ecs_u32_t
uint32_t ecs_u32_t
Built-in u32 type.
Definition meta.h:100
ecs_i16_t
int16_t ecs_i16_t
Built-in i16 type.
Definition meta.h:104
ecs_u8_t
uint8_t ecs_u8_t
Built-in u8 type.
Definition meta.h:98
ecs_i64_t
int64_t ecs_i64_t
Built-in i64 type.
Definition meta.h:106
ecs_string_t
char * ecs_string_t
Built-in string type.
Definition meta.h:110
ecs_u64_t
uint64_t ecs_u64_t
Built-in u64 type.
Definition meta.h:101
ecs_iptr_t
intptr_t ecs_iptr_t
Built-in iptr type.
Definition meta.h:107
ecs_uptr_t
uintptr_t ecs_uptr_t
Built-in uptr type.
Definition meta.h:102
EcsQuantity
FLECS_API const ecs_entity_t EcsQuantity
Tag added to unit quantities.
ecs_f32_t
float ecs_f32_t
Built-in f32 type.
Definition meta.h:108
ecs_primitive_kind_t
ecs_primitive_kind_t
Primitive type kinds supported by meta addon.
Definition meta.h:170
ecs_f64_t
double ecs_f64_t
Built-in f64 type.
Definition meta.h:109
ecs_char_t
char ecs_char_t
Built-in char type.
Definition meta.h:96
ecs_type_kind_t
ecs_type_kind_t
Type kinds supported by meta addon.
Definition meta.h:151
ecs_u16_t
uint16_t ecs_u16_t
Built-in u16 type.
Definition meta.h:99
ecs_i32_t
int32_t ecs_i32_t
Built-in i32 type.
Definition meta.h:105
ecs_i8_t
int8_t ecs_i8_t
Built-in i8 type.
Definition meta.h:103
ecs_byte_t
unsigned char ecs_byte_t
Built-in ecs_byte type.
Definition meta.h:97
ecs_entity_t
ecs_id_t ecs_entity_t
An entity identifier.
Definition flecs.h:381
flecs::Type
EcsType Type
Components.
Definition decl.hpp:40
flecs::member_t
ecs_member_t member_t
Embedded type aliases.
Definition decl.hpp:35
flecs::meta::primitive_kind_t
ecs_primitive_kind_t primitive_kind_t
Primitive type kinds supported by the reflection system.
Definition decl.hpp:91
flecs::bool_t
ecs_bool_t bool_t
Primitive type aliases.
Definition decl.hpp:19
flecs::meta::type_kind_t
ecs_type_kind_t type_kind_t
Type kinds supported by the reflection system.
Definition decl.hpp:80
flecs::entity_t
ecs_entity_t entity_t
Entity type.
Definition c_types.hpp:21
opaque.hpp
Helpers for opaque type registration.
EcsArray
Component added to array type entities.
Definition meta.h:319
EcsBitmask
Component added to bitmask type entities.
Definition meta.h:305
EcsEnum
Component added to enum type entities.
Definition meta.h:285
EcsMemberRanges
Component added to member entities to express valid value ranges.
Definition meta.h:213
EcsMember
Component added to member entities.
Definition meta.h:198
EcsPrimitive
Component added to primitive types.
Definition meta.h:193
EcsStruct
Component added to struct type entities.
Definition meta.h:264
EcsTypeSerializer
Component that stores the type serializer.
Definition meta.h:588
EcsType
Component that is automatically added to every type with the right kind.
Definition meta.h:163
EcsUnit
Component that stores unit data.
Definition meta.h:506
EcsVector
Component added to vector type entities.
Definition meta.h:325
ecs_bitmask_constant_t
Type that describes a bitmask constant.
Definition meta.h:290
ecs_enum_constant_t
Type that describes an enum constant.
Definition meta.h:270
ecs_member_t
Element type of members vector in EcsStruct.
Definition meta.h:220
ecs_meta_op_t
Meta type serializer instruction data.
Definition meta.h:569
flecs::bitmask
Base type for bitmasks.
Definition decl.hpp:53
flecs::world
The world.
Definition world.hpp:246