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

Flecs reflection framework. More...

Collaboration diagram for Meta:

Classes

struct  flecs::cursor
 Class for reading/writing dynamic values. More...
 
struct  flecs::bitmask
 Base type for bitmasks. More...
 
struct  flecs::opaque< T, ElemType >
 Type safe interface for opaque types. 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::Type = EcsType
 
using flecs::TypeSerializer = EcsTypeSerializer
 
using flecs::Primitive = EcsPrimitive
 
using flecs::Enum = EcsEnum
 
using flecs::Bitmask = EcsBitmask
 
using flecs::Member = EcsMember
 
using flecs::MemberRanges = EcsMemberRanges
 
using flecs::Struct = EcsStruct
 
using flecs::Array = EcsArray
 
using flecs::Vector = EcsVector
 
using flecs::Unit = EcsUnit
 
using flecs::meta::type_kind_t = ecs_type_kind_t
 
using flecs::meta::primitive_kind_t = ecs_primitive_kind_t
 
using flecs::serializer = ecs_serializer_t
 Serializer object, used for serializing opaque types.
 
using flecs::serialize_t = ecs_meta_serialize_t
 Serializer function, used to serialize opaque types.
 
template<typename T >
using flecs::serialize = int(*)(const serializer *, const T*)
 Type safe variant of serializer function.
 

Variables

uint32_t flecs::bitmask::value
 
const 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) const
 Make entity a unit.
 
const 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) const
 Make entity a derived unit.
 
const Self & unit_prefix (const char *symbol, int32_t factor=0, int32_t power=0) const
 Make entity a derived unit.
 
const Self & quantity (flecs::entity_t quantity) const
 Add quantity to unit.
 
template<typename Quantity >
const Self & quantity () const
 Make entity a unity prefix.
 
const Self & quantity () const
 Make entity a quantity.
 
untyped_componentmember (flecs::entity_t type_id, flecs::entity_t unit, const char *name, int32_t count=0)
 Add member with unit.
 
untyped_componentmember (flecs::entity_t type_id, flecs::entity_t unit, const char *name, int32_t count, size_t offset)
 Add member with unit, count and offset.
 
untyped_componentmember (flecs::entity_t type_id, const char *name, int32_t count=0)
 Add member.
 
untyped_componentmember (flecs::entity_t type_id, const char *name, int32_t count, size_t offset)
 Add member with count and offset.
 
template<typename MemberType >
untyped_componentmember (const char *name, int32_t count=0)
 Add member.
 
template<typename MemberType >
untyped_componentmember (const char *name, int32_t count, size_t offset)
 Add member.
 
template<typename MemberType >
untyped_componentmember (flecs::entity_t unit, const char *name, int32_t count=0)
 Add member with unit.
 
template<typename MemberType >
untyped_componentmember (flecs::entity_t unit, const char *name, int32_t count, size_t offset)
 Add member with unit.
 
template<typename MemberType , typename UnitType >
untyped_componentmember (const char *name, int32_t count=0)
 Add member with unit.
 
template<typename MemberType , typename UnitType >
untyped_componentmember (const char *name, int32_t count, size_t offset)
 Add member with unit.
 
template<typename MemberType , typename ComponentType , typename RealType = typename std::remove_extent<MemberType>::type>
untyped_componentmember (const char *name, const MemberType ComponentType::*ptr)
 Add member using pointer-to-member.
 
template<typename MemberType , typename ComponentType , typename RealType = typename std::remove_extent<MemberType>::type>
untyped_componentmember (flecs::entity_t unit, const char *name, const MemberType ComponentType::*ptr)
 Add member with unit using pointer-to-member.
 
template<typename UnitType , typename MemberType , typename ComponentType , typename RealType = typename std::remove_extent<MemberType>::type>
untyped_componentmember (const char *name, const MemberType ComponentType::*ptr)
 Add member with unit using pointer-to-member.
 
untyped_componentconstant (const char *name, int32_t value)
 Add constant.
 
untyped_componentbit (const char *name, uint32_t value)
 Add bitmask constant.
 
template<typename Elem >
untyped_componentarray (int32_t elem_count)
 Register array metadata for component.
 
untyped_componentrange (double min, double max)
 Add member value range.
 
untyped_componentwarning_range (double min, double max)
 Add member warning range.
 
untyped_componenterror_range (double min, double max)
 Add member error range.
 
flecs::cursor flecs::world::cursor (flecs::entity_t tid, void *ptr)
 Return meta cursor to value.
 
template<typename T >
flecs::cursor cursor (void *ptr)
 Return meta cursor to value.
 
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.

Flecs reflection framework.

Flecs reflection framework.

Typedef Documentation

◆ Array

Definition at line 48 of file decl.hpp.

◆ Bitmask

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 = ecs_bool_t

Definition at line 19 of file decl.hpp.

◆ char_t

using flecs::char_t = ecs_char_t

Definition at line 20 of file decl.hpp.

◆ Enum

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 = ecs_f32_t

Definition at line 31 of file decl.hpp.

◆ f64_t

using flecs::f64_t = ecs_f64_t

Definition at line 32 of file decl.hpp.

◆ i16_t

using flecs::i16_t = ecs_i16_t

Definition at line 27 of file decl.hpp.

◆ i32_t

using flecs::i32_t = ecs_i32_t

Definition at line 28 of file decl.hpp.

◆ i64_t

using flecs::i64_t = ecs_i64_t

Definition at line 29 of file decl.hpp.

◆ i8_t

using flecs::i8_t = ecs_i8_t

Definition at line 26 of file decl.hpp.

◆ iptr_t

using flecs::iptr_t = ecs_iptr_t

Definition at line 30 of file decl.hpp.

◆ Member

Definition at line 45 of file decl.hpp.

◆ member_t

Definition at line 35 of file decl.hpp.

◆ MemberRanges

Definition at line 46 of file decl.hpp.

◆ Primitive

Definition at line 42 of file decl.hpp.

◆ primitive_kind_t

Definition at line 92 of file decl.hpp.

◆ serialize

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

Type safe variant of serializer function.

Definition at line 28 of file opaque.hpp.

◆ serialize_t

Serializer function, used to serialize opaque types.

Definition at line 24 of file opaque.hpp.

◆ serializer

Serializer object, used for serializing opaque types.

Definition at line 21 of file opaque.hpp.

◆ Struct

Definition at line 47 of file decl.hpp.

◆ Type

Definition at line 40 of file decl.hpp.

◆ type_kind_t

Definition at line 81 of file decl.hpp.

◆ TypeSerializer

Definition at line 41 of file decl.hpp.

◆ u16_t

using flecs::u16_t = ecs_u16_t

Definition at line 22 of file decl.hpp.

◆ u32_t

using flecs::u32_t = ecs_u32_t

Definition at line 23 of file decl.hpp.

◆ u64_t

using flecs::u64_t = ecs_u64_t

Definition at line 24 of file decl.hpp.

◆ u8_t

using flecs::u8_t = ecs_u8_t

Definition at line 21 of file decl.hpp.

◆ Unit

Definition at line 50 of file decl.hpp.

◆ uptr_t

using flecs::uptr_t = ecs_uptr_t

Definition at line 25 of file decl.hpp.

◆ Vector

Definition at line 49 of file decl.hpp.

Function Documentation

◆ array()

template<typename Elem >
untyped_component & array ( int32_t elem_count)
related

Register array metadata for component.

Definition at line 232 of file untyped_component.inl.

◆ bit()

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

Add bitmask constant.

Definition at line 211 of file untyped_component.inl.

◆ constant()

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

Add constant.

Definition at line 191 of file untyped_component.inl.

◆ cursor() [1/2]

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

Return meta cursor to value.

Definition at line 14 of file world.inl.

◆ cursor() [2/2]

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

Return meta cursor to value.

Definition at line 20 of file world.inl.

◆ error_range()

template<typename T >
untyped_component & error_range ( double min,
double max )
related

Add member error range.

Definition at line 288 of file untyped_component.inl.

◆ member() [1/13]

template<typename MemberType , typename ComponentType , typename RealType = typename std::remove_extent<MemberType>::type>
untyped_component & member ( const char * name,
const MemberType ComponentType::* ptr )
related

Add member using pointer-to-member.

Definition at line 155 of file untyped_component.inl.

◆ member() [2/13]

template<typename UnitType , typename MemberType , typename ComponentType , typename RealType = typename std::remove_extent<MemberType>::type>
untyped_component & member ( const char * name,
const MemberType ComponentType::* ptr )
related

Add member with unit using pointer-to-member.

Definition at line 180 of file untyped_component.inl.

◆ member() [3/13]

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

Add member.

Definition at line 97 of file untyped_component.inl.

◆ member() [4/13]

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

Add member with unit.

Definition at line 142 of file untyped_component.inl.

◆ member() [5/13]

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

Add member.

Definition at line 87 of file untyped_component.inl.

◆ member() [6/13]

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

Add member with unit.

Definition at line 131 of file untyped_component.inl.

◆ member() [7/13]

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

Add member with count and offset.

Definition at line 76 of file untyped_component.inl.

◆ member() [8/13]

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

Add member.

Definition at line 67 of file untyped_component.inl.

◆ member() [9/13]

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

Add member with unit, count and offset.

Definition at line 56 of file untyped_component.inl.

◆ member() [10/13]

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

Add member with unit.

Definition at line 46 of file untyped_component.inl.

◆ member() [11/13]

template<typename MemberType , typename ComponentType , typename RealType = typename std::remove_extent<MemberType>::type>
untyped_component & member ( flecs::entity_t unit,
const char * name,
const MemberType ComponentType::* ptr )
related

Add member with unit using pointer-to-member.

Definition at line 167 of file untyped_component.inl.

◆ member() [12/13]

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

Add member with unit.

Definition at line 119 of file untyped_component.inl.

◆ member() [13/13]

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

Add member with unit.

Definition at line 108 of file untyped_component.inl.

◆ quantity() [1/3]

template<typename Quantity >
const Self & quantity ( ) const
related

Make entity a unity prefix.

Definition at line 79 of file entity_builder.inl.

◆ quantity() [2/3]

const Self & quantity ( ) const
related

Make entity a quantity.

Definition at line 84 of file entity_builder.inl.

◆ quantity() [3/3]

const Self & quantity ( flecs::entity_t quantity) const
related

Add quantity to unit.

Definition at line 72 of file entity_builder.inl.

◆ range()

template<typename T >
untyped_component & range ( double min,
double max )
related

Add member value range.

Definition at line 244 of file untyped_component.inl.

◆ unit() [1/2]

const 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 ) const

Make entity a unit.

Definition at line 14 of file entity_builder.inl.

◆ unit() [2/2]

const 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 ) const
related

Make entity a derived unit.

Definition at line 36 of file entity_builder.inl.

◆ unit_prefix()

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

Make entity a derived unit.

Definition at line 56 of file entity_builder.inl.

◆ warning_range()

template<typename T >
untyped_component & warning_range ( double min,
double max )
related

Add member warning range.

Definition at line 266 of file untyped_component.inl.

Variable Documentation

◆ value

uint32_t flecs::bitmask::value

Definition at line 54 of file decl.hpp.