Skip to content

Commit

Permalink
Make enum reflection work, change define names and add comments
Browse files Browse the repository at this point in the history
- Improve define names
- Split FLECS_GLOBAL_API in two because `export` comes before template delcarations and `static` afterwards
- Fix enum reflection
  • Loading branch information
Gaspard-- committed Sep 24, 2024
1 parent c50e36a commit ab61d20
Show file tree
Hide file tree
Showing 11 changed files with 309 additions and 281 deletions.
286 changes: 148 additions & 138 deletions distr/flecs.h

Large diffs are not rendered by default.

136 changes: 68 additions & 68 deletions include/flecs/addons/cpp/c_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,96 +73,96 @@ using Poly = EcsPoly;
using DefaultChildComponent = EcsDefaultChildComponent;

/* Builtin tags */
FLECS_API_GLOBAL const flecs::entity_t Query = EcsQuery;
FLECS_API_GLOBAL const flecs::entity_t Observer = EcsObserver;
FLECS_API_GLOBAL const flecs::entity_t Private = EcsPrivate;
FLECS_API_GLOBAL const flecs::entity_t Module = EcsModule;
FLECS_API_GLOBAL const flecs::entity_t Prefab = EcsPrefab;
FLECS_API_GLOBAL const flecs::entity_t Disabled = EcsDisabled;
FLECS_API_GLOBAL const flecs::entity_t Empty = EcsEmpty;
FLECS_API_GLOBAL const flecs::entity_t Monitor = EcsMonitor;
FLECS_API_GLOBAL const flecs::entity_t System = EcsSystem;
FLECS_API_GLOBAL const flecs::entity_t Pipeline = ecs_id(EcsPipeline);
FLECS_API_GLOBAL const flecs::entity_t Phase = EcsPhase;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Query = EcsQuery;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Observer = EcsObserver;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Private = EcsPrivate;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Module = EcsModule;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Prefab = EcsPrefab;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Disabled = EcsDisabled;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Empty = EcsEmpty;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Monitor = EcsMonitor;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t System = EcsSystem;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Pipeline = ecs_id(EcsPipeline);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Phase = EcsPhase;

/* Builtin event tags */
FLECS_API_GLOBAL const flecs::entity_t OnAdd = EcsOnAdd;
FLECS_API_GLOBAL const flecs::entity_t OnRemove = EcsOnRemove;
FLECS_API_GLOBAL const flecs::entity_t OnSet = EcsOnSet;
FLECS_API_GLOBAL const flecs::entity_t OnTableCreate = EcsOnTableCreate;
FLECS_API_GLOBAL const flecs::entity_t OnTableDelete = EcsOnTableDelete;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OnAdd = EcsOnAdd;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OnRemove = EcsOnRemove;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OnSet = EcsOnSet;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OnTableCreate = EcsOnTableCreate;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OnTableDelete = EcsOnTableDelete;

/* Builtin term flags */
FLECS_API_GLOBAL const uint64_t Self = EcsSelf;
FLECS_API_GLOBAL const uint64_t Up = EcsUp;
FLECS_API_GLOBAL const uint64_t Trav = EcsTrav;
FLECS_API_GLOBAL const uint64_t Cascade = EcsCascade;
FLECS_API_GLOBAL const uint64_t Desc = EcsDesc;
FLECS_API_GLOBAL const uint64_t IsVariable = EcsIsVariable;
FLECS_API_GLOBAL const uint64_t IsEntity = EcsIsEntity;
FLECS_API_GLOBAL const uint64_t IsName = EcsIsName;
FLECS_API_GLOBAL const uint64_t TraverseFlags = EcsTraverseFlags;
FLECS_API_GLOBAL const uint64_t TermRefFlags = EcsTermRefFlags;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t Self = EcsSelf;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t Up = EcsUp;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t Trav = EcsTrav;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t Cascade = EcsCascade;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t Desc = EcsDesc;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t IsVariable = EcsIsVariable;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t IsEntity = EcsIsEntity;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t IsName = EcsIsName;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t TraverseFlags = EcsTraverseFlags;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const uint64_t TermRefFlags = EcsTermRefFlags;

/* Builtin entity ids */
FLECS_API_GLOBAL const flecs::entity_t Flecs = EcsFlecs;
FLECS_API_GLOBAL const flecs::entity_t FlecsCore = EcsFlecsCore;
FLECS_API_GLOBAL const flecs::entity_t World = EcsWorld;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Flecs = EcsFlecs;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t FlecsCore = EcsFlecsCore;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t World = EcsWorld;

/* Component traits */
FLECS_API_GLOBAL const flecs::entity_t Wildcard = EcsWildcard;
FLECS_API_GLOBAL const flecs::entity_t Any = EcsAny;
FLECS_API_GLOBAL const flecs::entity_t This = EcsThis;
FLECS_API_GLOBAL const flecs::entity_t Transitive = EcsTransitive;
FLECS_API_GLOBAL const flecs::entity_t Reflexive = EcsReflexive;
FLECS_API_GLOBAL const flecs::entity_t Final = EcsFinal;
FLECS_API_GLOBAL const flecs::entity_t PairIsTag = EcsPairIsTag;
FLECS_API_GLOBAL const flecs::entity_t Exclusive = EcsExclusive;
FLECS_API_GLOBAL const flecs::entity_t Acyclic = EcsAcyclic;
FLECS_API_GLOBAL const flecs::entity_t Traversable = EcsTraversable;
FLECS_API_GLOBAL const flecs::entity_t Symmetric = EcsSymmetric;
FLECS_API_GLOBAL const flecs::entity_t With = EcsWith;
FLECS_API_GLOBAL const flecs::entity_t OneOf = EcsOneOf;
FLECS_API_GLOBAL const flecs::entity_t Trait = EcsTrait;
FLECS_API_GLOBAL const flecs::entity_t Relationship = EcsRelationship;
FLECS_API_GLOBAL const flecs::entity_t Target = EcsTarget;
FLECS_API_GLOBAL const flecs::entity_t CanToggle = EcsCanToggle;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Wildcard = EcsWildcard;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Any = EcsAny;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t This = EcsThis;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Transitive = EcsTransitive;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Reflexive = EcsReflexive;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Final = EcsFinal;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t PairIsTag = EcsPairIsTag;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Exclusive = EcsExclusive;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Acyclic = EcsAcyclic;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Traversable = EcsTraversable;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Symmetric = EcsSymmetric;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t With = EcsWith;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OneOf = EcsOneOf;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Trait = EcsTrait;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Relationship = EcsRelationship;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Target = EcsTarget;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t CanToggle = EcsCanToggle;

/* OnInstantiate trait */
FLECS_API_GLOBAL const flecs::entity_t OnInstantiate = EcsOnInstantiate;
FLECS_API_GLOBAL const flecs::entity_t Override = EcsOverride;
FLECS_API_GLOBAL const flecs::entity_t Inherit = EcsInherit;
FLECS_API_GLOBAL const flecs::entity_t DontInherit = EcsDontInherit;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OnInstantiate = EcsOnInstantiate;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Override = EcsOverride;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Inherit = EcsInherit;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t DontInherit = EcsDontInherit;

/* OnDelete/OnDeleteTarget traits */
FLECS_API_GLOBAL const flecs::entity_t OnDelete = EcsOnDelete;
FLECS_API_GLOBAL const flecs::entity_t OnDeleteTarget = EcsOnDeleteTarget;
FLECS_API_GLOBAL const flecs::entity_t Remove = EcsRemove;
FLECS_API_GLOBAL const flecs::entity_t Delete = EcsDelete;
FLECS_API_GLOBAL const flecs::entity_t Panic = EcsPanic;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OnDelete = EcsOnDelete;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t OnDeleteTarget = EcsOnDeleteTarget;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Remove = EcsRemove;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Delete = EcsDelete;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Panic = EcsPanic;

/* Builtin relationships */
FLECS_API_GLOBAL const flecs::entity_t IsA = EcsIsA;
FLECS_API_GLOBAL const flecs::entity_t ChildOf = EcsChildOf;
FLECS_API_GLOBAL const flecs::entity_t DependsOn = EcsDependsOn;
FLECS_API_GLOBAL const flecs::entity_t SlotOf = EcsSlotOf;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t IsA = EcsIsA;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t ChildOf = EcsChildOf;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t DependsOn = EcsDependsOn;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t SlotOf = EcsSlotOf;

/* Builtin identifiers */
FLECS_API_GLOBAL const flecs::entity_t Name = EcsName;
FLECS_API_GLOBAL const flecs::entity_t Symbol = EcsSymbol;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Name = EcsName;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Symbol = EcsSymbol;

/* Storage */
FLECS_API_GLOBAL const flecs::entity_t Sparse = EcsSparse;
FLECS_API_GLOBAL const flecs::entity_t Union = EcsUnion;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Sparse = EcsSparse;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Union = EcsUnion;

/* Builtin predicates for comparing entity ids in queries. */
FLECS_API_GLOBAL const flecs::entity_t PredEq = EcsPredEq;
FLECS_API_GLOBAL const flecs::entity_t PredMatch = EcsPredMatch;
FLECS_API_GLOBAL const flecs::entity_t PredLookup = EcsPredLookup;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t PredEq = EcsPredEq;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t PredMatch = EcsPredMatch;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t PredLookup = EcsPredLookup;

/* Builtin marker entities for query scopes */
FLECS_API_GLOBAL const flecs::entity_t ScopeOpen = EcsScopeOpen;
FLECS_API_GLOBAL const flecs::entity_t ScopeClose = EcsScopeClose;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t ScopeOpen = EcsScopeOpen;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t ScopeClose = EcsScopeClose;

/** @} */

Expand Down
2 changes: 1 addition & 1 deletion include/flecs/addons/cpp/component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#ifndef FLECS_CUSTOM_STD_INCLUDE
#ifndef FLECS_NO_STD_INCLUDE
#include <ctype.h>
#include <stdio.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/flecs/addons/cpp/delegate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#pragma once

#ifndef FLECS_CUSTOM_STD_INCLUDE
#ifndef FLECS_NO_STD_INCLUDE
#include <utility> // std::declval
#endif

Expand Down
12 changes: 10 additions & 2 deletions include/flecs/addons/cpp/flecs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#pragma once

// STL includes
#ifndef FLECS_CUSTOM_STD_INCLUDE
#ifndef FLECS_NO_STD_INCLUDE
#include <type_traits>
#endif

Expand All @@ -15,7 +15,15 @@
#endif

#ifndef FLECS_API_GLOBAL
#define FLECS_API_GLOBAL static
#define FLECS_API_GLOBAL
#endif

#ifndef FLECS_API_DEPENDENCY
#define FLECS_API_DEPENDENCY
#endif

#ifndef FLECS_STATIC_IN_HEADER
#define FLECS_STATIC_IN_HEADER static
#endif

/**
Expand Down
8 changes: 4 additions & 4 deletions include/flecs/addons/cpp/mixins/doc/decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ namespace doc {
FLECS_API_STRUCT using Description = EcsDocDescription;

/** flecs.doc.Brief component */
FLECS_API_GLOBAL const flecs::entity_t Brief = EcsDocBrief;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Brief = EcsDocBrief;

/** flecs.doc.Detail component */
FLECS_API_GLOBAL const flecs::entity_t Detail = EcsDocDetail;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Detail = EcsDocDetail;

/** flecs.doc.Link component */
FLECS_API_GLOBAL const flecs::entity_t Link = EcsDocLink;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Link = EcsDocLink;

/** flecs.doc.Color component */
FLECS_API_GLOBAL const flecs::entity_t Color = EcsDocColor;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Color = EcsDocColor;

/** @private */
namespace _ {
Expand Down
90 changes: 45 additions & 45 deletions include/flecs/addons/cpp/mixins/meta/decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,59 +55,59 @@ FLECS_API_STRUCT struct bitmask {
};

/* Handles to builtin reflection types */
FLECS_API_GLOBAL const flecs::entity_t Bool = ecs_id(ecs_bool_t);
FLECS_API_GLOBAL const flecs::entity_t Char = ecs_id(ecs_char_t);
FLECS_API_GLOBAL const flecs::entity_t Byte = ecs_id(ecs_byte_t);
FLECS_API_GLOBAL const flecs::entity_t U8 = ecs_id(ecs_u8_t);
FLECS_API_GLOBAL const flecs::entity_t U16 = ecs_id(ecs_u16_t);
FLECS_API_GLOBAL const flecs::entity_t U32 = ecs_id(ecs_u32_t);
FLECS_API_GLOBAL const flecs::entity_t U64 = ecs_id(ecs_u64_t);
FLECS_API_GLOBAL const flecs::entity_t Uptr = ecs_id(ecs_uptr_t);
FLECS_API_GLOBAL const flecs::entity_t I8 = ecs_id(ecs_i8_t);
FLECS_API_GLOBAL const flecs::entity_t I16 = ecs_id(ecs_i16_t);
FLECS_API_GLOBAL const flecs::entity_t I32 = ecs_id(ecs_i32_t);
FLECS_API_GLOBAL const flecs::entity_t I64 = ecs_id(ecs_i64_t);
FLECS_API_GLOBAL const flecs::entity_t Iptr = ecs_id(ecs_iptr_t);
FLECS_API_GLOBAL const flecs::entity_t F32 = ecs_id(ecs_f32_t);
FLECS_API_GLOBAL const flecs::entity_t F64 = ecs_id(ecs_f64_t);
FLECS_API_GLOBAL const flecs::entity_t String = ecs_id(ecs_string_t);
FLECS_API_GLOBAL const flecs::entity_t Entity = ecs_id(ecs_entity_t);
FLECS_API_GLOBAL const flecs::entity_t Constant = EcsConstant;
FLECS_API_GLOBAL const flecs::entity_t Quantity = EcsQuantity;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Bool = ecs_id(ecs_bool_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Char = ecs_id(ecs_char_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Byte = ecs_id(ecs_byte_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t U8 = ecs_id(ecs_u8_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t U16 = ecs_id(ecs_u16_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t U32 = ecs_id(ecs_u32_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t U64 = ecs_id(ecs_u64_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Uptr = ecs_id(ecs_uptr_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t I8 = ecs_id(ecs_i8_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t I16 = ecs_id(ecs_i16_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t I32 = ecs_id(ecs_i32_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t I64 = ecs_id(ecs_i64_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Iptr = ecs_id(ecs_iptr_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t F32 = ecs_id(ecs_f32_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t F64 = ecs_id(ecs_f64_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t String = ecs_id(ecs_string_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Entity = ecs_id(ecs_entity_t);
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Constant = EcsConstant;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const flecs::entity_t Quantity = EcsQuantity;

namespace meta {

/* Type kinds supported by reflection system */
FLECS_API_STRUCT using type_kind_t = ecs_type_kind_t;
FLECS_API_GLOBAL const type_kind_t PrimitiveType = EcsPrimitiveType;
FLECS_API_GLOBAL const type_kind_t BitmaskType = EcsBitmaskType;
FLECS_API_GLOBAL const type_kind_t EnumType = EcsEnumType;
FLECS_API_GLOBAL const type_kind_t StructType = EcsStructType;
FLECS_API_GLOBAL const type_kind_t ArrayType = EcsArrayType;
FLECS_API_GLOBAL const type_kind_t VectorType = EcsVectorType;
FLECS_API_GLOBAL const type_kind_t CustomType = EcsOpaqueType;
FLECS_API_GLOBAL const type_kind_t TypeKindLast = EcsTypeKindLast;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const type_kind_t PrimitiveType = EcsPrimitiveType;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const type_kind_t BitmaskType = EcsBitmaskType;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const type_kind_t EnumType = EcsEnumType;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const type_kind_t StructType = EcsStructType;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const type_kind_t ArrayType = EcsArrayType;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const type_kind_t VectorType = EcsVectorType;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const type_kind_t CustomType = EcsOpaqueType;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const type_kind_t TypeKindLast = EcsTypeKindLast;

/* Primitive type kinds supported by reflection system */
FLECS_API_STRUCT using primitive_kind_t = ecs_primitive_kind_t;
FLECS_API_GLOBAL const primitive_kind_t Bool = EcsBool;
FLECS_API_GLOBAL const primitive_kind_t Char = EcsChar;
FLECS_API_GLOBAL const primitive_kind_t Byte = EcsByte;
FLECS_API_GLOBAL const primitive_kind_t U8 = EcsU8;
FLECS_API_GLOBAL const primitive_kind_t U16 = EcsU16;
FLECS_API_GLOBAL const primitive_kind_t U32 = EcsU32;
FLECS_API_GLOBAL const primitive_kind_t U64 = EcsU64;
FLECS_API_GLOBAL const primitive_kind_t I8 = EcsI8;
FLECS_API_GLOBAL const primitive_kind_t I16 = EcsI16;
FLECS_API_GLOBAL const primitive_kind_t I32 = EcsI32;
FLECS_API_GLOBAL const primitive_kind_t I64 = EcsI64;
FLECS_API_GLOBAL const primitive_kind_t F32 = EcsF32;
FLECS_API_GLOBAL const primitive_kind_t F64 = EcsF64;
FLECS_API_GLOBAL const primitive_kind_t UPtr = EcsUPtr;
FLECS_API_GLOBAL const primitive_kind_t IPtr = EcsIPtr;
FLECS_API_GLOBAL const primitive_kind_t String = EcsString;
FLECS_API_GLOBAL const primitive_kind_t Entity = EcsEntity;
FLECS_API_GLOBAL const primitive_kind_t PrimitiveKindLast = EcsPrimitiveKindLast;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t Bool = EcsBool;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t Char = EcsChar;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t Byte = EcsByte;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t U8 = EcsU8;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t U16 = EcsU16;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t U32 = EcsU32;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t U64 = EcsU64;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t I8 = EcsI8;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t I16 = EcsI16;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t I32 = EcsI32;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t I64 = EcsI64;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t F32 = EcsF32;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t F64 = EcsF64;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t UPtr = EcsUPtr;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t IPtr = EcsIPtr;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t String = EcsString;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t Entity = EcsEntity;
FLECS_API_GLOBAL FLECS_STATIC_IN_HEADER const primitive_kind_t PrimitiveKindLast = EcsPrimitiveKindLast;

/** @} */

Expand Down
Loading

0 comments on commit ab61d20

Please sign in to comment.