Flecs v3.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches

Flecs reflection framework. More...

Classes

struct  flecs::bitmask
 Base type for bitmasks. More...
 
struct  flecs::meta::cursor
 Class for reading/writing dynamic values. More...
 

Typedefs

using flecs::bool_t = ecs_bool_t
 
using flecs::char_t = ecs_char_t
 
using flecs::u8_t = ecs_u8_t
 
using flecs::u16_t = ecs_u16_t
 
using flecs::u32_t = ecs_u32_t
 
using flecs::u64_t = ecs_u64_t
 
using flecs::uptr_t = ecs_uptr_t
 
using flecs::i8_t = ecs_i8_t
 
using flecs::i16_t = ecs_i16_t
 
using flecs::i32_t = ecs_i32_t
 
using flecs::i64_t = ecs_i64_t
 
using flecs::iptr_t = ecs_iptr_t
 
using flecs::f32_t = ecs_f32_t
 
using flecs::f64_t = ecs_f64_t
 
using flecs::member_t = ecs_member_t
 
using flecs::enum_constant_t = ecs_enum_constant_t
 
using flecs::bitmask_constant_t = ecs_bitmask_constant_t
 
using flecs::MetaType = EcsMetaType
 
using flecs::MetaTypeSerialized = EcsMetaTypeSerialized
 
using flecs::Primitive = EcsPrimitive
 
using flecs::Enum = EcsEnum
 
using flecs::Bitmask = EcsBitmask
 
using flecs::Member = EcsMember
 
using flecs::Struct = EcsStruct
 
using flecs::Array = EcsArray
 
using flecs::Vector = EcsVector
 
using flecs::Unit = EcsUnit
 
using flecs::serializer = ecs_meta_serializer_t
 Serializer object, used for serializing opaque types. More...
 
using flecs::serialize_t = ecs_meta_serialize_t
 Serializer function, used to serialize opaque types. More...
 
template<typename T >
using flecs::serialize = int(*)(const serializer *, const T *)
 Type safe variant of serializer function. More...
 
using flecs::meta::type_kind_t = ecs_type_kind_t
 
using flecs::meta::primitive_kind_t = ecs_primitive_kind_t
 

Variables

uint32_t flecs::bitmask::value
 
Self & flecs::entity_view::unit (const char *symbol, flecs::entity_t prefix=0, flecs::entity_t base=0, flecs::entity_t over=0, int32_t factor=0, int32_t power=0)
 Make entity a unit. More...
 
Self & unit (flecs::entity_t prefix=0, flecs::entity_t base=0, flecs::entity_t over=0, int32_t factor=0, int32_t power=0)
 Make entity a derived unit. More...
 
Self & unit_prefix (const char *symbol, int32_t factor=0, int32_t power=0)
 Make entity a derived unit. More...
 
Self & quantity (flecs::entity_t quantity)
 Add quantity to unit. More...
 
template<typename Quantity >
Self & quantity ()
 Make entity a unity prefix. More...
 
Self & quantity ()
 Make entity a quantity. More...
 
untyped_componentflecs::component< T >::member (flecs::entity_t type_id, const char *name, int32_t count=0, size_t offset=0)
 Add member. More...
 
untyped_componentmember (flecs::entity_t type_id, flecs::entity_t unit, const char *name, int32_t count=0, size_t offset=0)
 Add member with unit. More...
 
template<typename MemberType >
untyped_componentmember (const char *name, int32_t count=0, size_t offset=0)
 Add member. More...
 
template<typename MemberType >
untyped_componentmember (flecs::entity_t unit, const char *name, int32_t count=0, size_t offset=0)
 Add member with unit. More...
 
template<typename MemberType , typename UnitType >
untyped_componentmember (const char *name, int32_t count=0, size_t offset=0)
 Add member with unit. More...
 
untyped_componentconstant (const char *name, int32_t value)
 Add constant. More...
 
untyped_componentbit (const char *name, uint32_t value)
 Add bitmask constant. More...
 
flecs::string flecs::world::to_expr (flecs::entity_t tid, const void *value)
 Convert value to string. More...
 
template<typename T >
flecs::string to_expr (const T *value)
 Convert value to string. More...
 
flecs::meta::cursor cursor (flecs::entity_t tid, void *ptr)
 Return meta cursor to value. More...
 
template<typename T >
flecs::meta::cursor cursor (void *ptr)
 Return meta cursor to value. More...
 
flecs::entity primitive (flecs::meta::primitive_kind_t kind)
 Create primitive type.
 
flecs::entity array (flecs::entity_t elem_id, int32_t array_count)
 Create array type.
 
template<typename T >
flecs::entity array (int32_t array_count)
 Create array type.
 
flecs::entity vector (flecs::entity_t elem_id)
 Create vector type.
 
template<typename T >
flecs::entity vector ()
 Create vector type.
 

Detailed Description

Flecs reflection framework.

Typedef Documentation

◆ Array

using flecs::Array = typedef EcsArray

Definition at line 47 of file decl.hpp.

◆ Bitmask

using flecs::Bitmask = typedef EcsBitmask

Definition at line 44 of file decl.hpp.

◆ bitmask_constant_t

Definition at line 37 of file decl.hpp.

◆ bool_t

using flecs::bool_t = typedef ecs_bool_t

Definition at line 19 of file decl.hpp.

◆ char_t

using flecs::char_t = typedef ecs_char_t

Definition at line 20 of file decl.hpp.

◆ Enum

using flecs::Enum = typedef EcsEnum

Definition at line 43 of file decl.hpp.

◆ enum_constant_t

Definition at line 36 of file decl.hpp.

◆ f32_t

using flecs::f32_t = typedef ecs_f32_t

Definition at line 31 of file decl.hpp.

◆ f64_t

using flecs::f64_t = typedef ecs_f64_t

Definition at line 32 of file decl.hpp.

◆ i16_t

using flecs::i16_t = typedef ecs_i16_t

Definition at line 27 of file decl.hpp.

◆ i32_t

using flecs::i32_t = typedef ecs_i32_t

Definition at line 28 of file decl.hpp.

◆ i64_t

using flecs::i64_t = typedef ecs_i64_t

Definition at line 29 of file decl.hpp.

◆ i8_t

using flecs::i8_t = typedef ecs_i8_t

Definition at line 26 of file decl.hpp.

◆ iptr_t

using flecs::iptr_t = typedef ecs_iptr_t

Definition at line 30 of file decl.hpp.

◆ Member

using flecs::Member = typedef EcsMember

Definition at line 45 of file decl.hpp.

◆ member_t

using flecs::member_t = typedef ecs_member_t

Definition at line 35 of file decl.hpp.

◆ MetaType

using flecs::MetaType = typedef EcsMetaType

Definition at line 40 of file decl.hpp.

◆ MetaTypeSerialized

Definition at line 41 of file decl.hpp.

◆ Primitive

using flecs::Primitive = typedef EcsPrimitive

Definition at line 42 of file decl.hpp.

◆ primitive_kind_t

using flecs::meta::primitive_kind_t = typedef ecs_primitive_kind_t

Definition at line 101 of file decl.hpp.

◆ serialize

template<typename T >
using flecs::serialize = typedef int(*)(const serializer *, const T*)

Type safe variant of serializer function.

Definition at line 85 of file decl.hpp.

◆ serialize_t

Serializer function, used to serialize opaque types.

Definition at line 81 of file decl.hpp.

◆ serializer

Serializer object, used for serializing opaque types.

Definition at line 78 of file decl.hpp.

◆ Struct

using flecs::Struct = typedef EcsStruct

Definition at line 46 of file decl.hpp.

◆ type_kind_t

Definition at line 90 of file decl.hpp.

◆ u16_t

using flecs::u16_t = typedef ecs_u16_t

Definition at line 22 of file decl.hpp.

◆ u32_t

using flecs::u32_t = typedef ecs_u32_t

Definition at line 23 of file decl.hpp.

◆ u64_t

using flecs::u64_t = typedef ecs_u64_t

Definition at line 24 of file decl.hpp.

◆ u8_t

using flecs::u8_t = typedef ecs_u8_t

Definition at line 21 of file decl.hpp.

◆ Unit

using flecs::Unit = typedef EcsUnit

Definition at line 49 of file decl.hpp.

◆ uptr_t

using flecs::uptr_t = typedef ecs_uptr_t

Definition at line 25 of file decl.hpp.

◆ Vector

using flecs::Vector = typedef EcsVector

Definition at line 48 of file decl.hpp.

Function Documentation

◆ bit()

template<typename T >
untyped_component & bit ( const char *  name,
uint32_t  value 
)
related

Add bitmask constant.

Definition at line 92 of file untyped_component.inl.

◆ constant()

template<typename T >
untyped_component & constant ( const char *  name,
int32_t  value 
)
related

Add constant.

Definition at line 75 of file untyped_component.inl.

◆ cursor() [1/2]

flecs::meta::cursor cursor ( flecs::entity_t  tid,
void *  ptr 
)
related

Return meta cursor to value.

Definition at line 27 of file world.inl.

◆ cursor() [2/2]

template<typename T >
flecs::meta::cursor cursor ( void *  ptr)
related

Return meta cursor to value.

Definition at line 33 of file world.inl.

◆ member() [1/5]

template<typename MemberType >
untyped_component & member ( const char *  name,
int32_t  count = 0,
size_t  offset = 0 
)
related

Add member.

Definition at line 54 of file untyped_component.inl.

◆ member() [2/5]

template<typename MemberType , typename UnitType >
untyped_component & member ( const char *  name,
int32_t  count = 0,
size_t  offset = 0 
)
related

Add member with unit.

Definition at line 68 of file untyped_component.inl.

◆ member() [3/5]

template<typename T >
untyped_component & member ( flecs::entity_t  type_id,
const char *  name,
int32_t  count = 0,
size_t  offset = 0 
)

Add member.

Definition at line 14 of file untyped_component.inl.

◆ member() [4/5]

template<typename T >
untyped_component & member ( flecs::entity_t  type_id,
flecs::entity_t  unit,
const char *  name,
int32_t  count = 0,
size_t  offset = 0 
)
related

Add member with unit.

Definition at line 33 of file untyped_component.inl.

◆ member() [5/5]

template<typename MemberType >
untyped_component & member ( flecs::entity_t  unit,
const char *  name,
int32_t  count = 0,
size_t  offset = 0 
)
related

Add member with unit.

Definition at line 61 of file untyped_component.inl.

◆ quantity() [1/3]

template<typename Quantity >
Self & quantity ( )
related

Make entity a unity prefix.

Definition at line 79 of file entity_builder.inl.

◆ quantity() [2/3]

Self & quantity ( )
related

Make entity a quantity.

Definition at line 84 of file entity_builder.inl.

◆ quantity() [3/3]

Self & quantity ( flecs::entity_t  quantity)
related

Add quantity to unit.

Definition at line 72 of file entity_builder.inl.

◆ to_expr() [1/2]

template<typename T >
flecs::string to_expr ( const T *  value)
related

Convert value to string.

Definition at line 21 of file world.inl.

◆ to_expr() [2/2]

flecs::string to_expr ( flecs::entity_t  tid,
const void *  value 
)

Convert value to string.

Definition at line 14 of file world.inl.

◆ unit() [1/2]

Self & unit ( const char *  symbol,
flecs::entity_t  prefix = 0,
flecs::entity_t  base = 0,
flecs::entity_t  over = 0,
int32_t  factor = 0,
int32_t  power = 0 
)

Make entity a unit.

Definition at line 14 of file entity_builder.inl.

◆ unit() [2/2]

Self & unit ( flecs::entity_t  prefix = 0,
flecs::entity_t  base = 0,
flecs::entity_t  over = 0,
int32_t  factor = 0,
int32_t  power = 0 
)
related

Make entity a derived unit.

Definition at line 36 of file entity_builder.inl.

◆ unit_prefix()

Self & unit_prefix ( const char *  symbol,
int32_t  factor = 0,
int32_t  power = 0 
)
related

Make entity a derived unit.

Definition at line 56 of file entity_builder.inl.

Variable Documentation

◆ value

uint32_t flecs::bitmask::value

Definition at line 53 of file decl.hpp.