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

Int to enum. More...

Classes

struct  always_false
 
struct  arg_list
 
struct  builder
 
struct  component_binding_ctx
 
struct  delegate
 
struct  each_column_base
 
struct  each_delegate
 
struct  each_field
 
struct  each_field< T, if_t< !is_pointer< T >::value &&!is_empty< actual_type_t< T > >::value &&!is_actual< T >::value > >
 
struct  each_field< T, if_t< !is_pointer< T >::value &&!is_empty< actual_type_t< T > >::value &&is_actual< T >::value > >
 
struct  each_field< T, if_t< is_empty< actual_type_t< T > >::value &&!is_pointer< T >::value > >
 
struct  each_field< T, if_t< is_pointer< T >::value &&!is_empty< actual_type_t< T > >::value > >
 
struct  each_ref_field
 
struct  entity_observer_delegate
 
struct  entity_observer_factory
 
struct  entity_payload_observer_delegate
 
struct  entity_with_delegate
 
struct  entity_with_delegate< Func, if_t< is_callable< Func >::value > >
 
struct  entity_with_delegate_impl
 
struct  entity_with_delegate_impl< arg_list< Args ... > >
 
struct  enum_constant_data
 Enumeration constant data. More...
 
struct  enum_data_impl
 Enumeration type data. More...
 
struct  enum_is_valid
 
struct  enum_reflection
 Provides utilities for enum reflection. More...
 
struct  enum_type
 Class that scans an enum for constants, extracts names & creates entities. More...
 
struct  event_from_func
 
struct  event_from_func< Func, if_t< arity< Func >::value==1 > >
 
struct  event_from_func< Func, if_t< arity< Func >::value==2 > >
 
struct  field_ptr
 
struct  field_ptrs
 
struct  find_delegate
 
struct  function_traits
 
struct  function_traits_defs
 
struct  function_traits_impl
 
struct  function_traits_impl< ReturnType(*)(Args...)>
 
struct  function_traits_impl< ReturnType(Args...)>
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) const & >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) const && >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) const >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) const volatile & >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) const volatile && >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) const volatile >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) volatile & >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) volatile && >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...) volatile >
 
struct  function_traits_impl< ReturnType(ClassType::*)(Args...)>
 
struct  function_traits_no_cv
 
struct  function_traits_no_cv< T, decltype((void)&T::operator())>
 
struct  node_builder
 
struct  pair_base
 
struct  placement_new_tag_t
 
struct  query_delegate
 
struct  query_delegate< Func, if_not_t< is_same< first_arg_t< Func >, flecs::entity >::value > >
 
struct  query_delegate< Func, if_t< is_same< first_arg_t< Func >, flecs::entity >::value > >
 
struct  query_delegate_no_ent
 
struct  query_delegate_no_ent< Func, arg_list< Args ... > >
 
struct  query_delegate_w_ent
 
struct  query_delegate_w_ent< Func, arg_list< E, Args ... > >
 
struct  range_iterator
 Iterate over an integer range (used to iterate over entity range). More...
 
struct  run_delegate
 
struct  sig
 
struct  to_constant
 
struct  type
 
struct  type< T, if_not_t< is_pair< T >::value > >
 
struct  type< T, if_t< is_pair< T >::value > >
 
struct  type_impl
 

Typedefs

template<typename ... Components>
using alert_builder_base
 
template<typename Func >
using event_from_func_t = typename event_from_func<Func>::type
 
template<typename ... Components>
using observer_builder_base
 
template<typename ... Components>
using pipeline_builder_base
 
template<typename ... Components>
using query_builder_base
 
template<typename ... Components>
using system_builder_base
 

Functions

template<typename T >
const char * symbol_name ()
 
template<>
const char * symbol_name< uint8_t > ()
 
template<>
const char * symbol_name< uint16_t > ()
 
template<>
const char * symbol_name< uint32_t > ()
 
template<>
const char * symbol_name< uint64_t > ()
 
template<>
const char * symbol_name< int8_t > ()
 
template<>
const char * symbol_name< int16_t > ()
 
template<>
const char * symbol_name< int32_t > ()
 
template<>
const char * symbol_name< int64_t > ()
 
template<>
const char * symbol_name< float > ()
 
template<>
const char * symbol_name< double > ()
 
template<typename T , enable_if_t< std::is_trivial< T >::value==true > * = nullptr>
void register_lifecycle_actions (ecs_world_t *, ecs_entity_t)
 
template<typename T >
void ctor_impl (void *ptr, int32_t count, const ecs_type_info_t *info)
 
template<typename T >
void dtor_impl (void *ptr, int32_t count, const ecs_type_info_t *info)
 
template<typename T >
void copy_impl (void *dst_ptr, const void *src_ptr, int32_t count, const ecs_type_info_t *info)
 
template<typename T >
void move_impl (void *dst_ptr, void *src_ptr, int32_t count, const ecs_type_info_t *info)
 
template<typename T >
void copy_ctor_impl (void *dst_ptr, const void *src_ptr, int32_t count, const ecs_type_info_t *info)
 
template<typename T >
void move_ctor_impl (void *dst_ptr, void *src_ptr, int32_t count, const ecs_type_info_t *info)
 
template<typename T >
void ctor_move_dtor_impl (void *dst_ptr, void *src_ptr, int32_t count, const ecs_type_info_t *info)
 
template<typename T , if_not_t< std::is_trivially_move_assignable< T >::value > = 0>
void move_dtor_impl (void *dst_ptr, void *src_ptr, int32_t count, const ecs_type_info_t *info)
 
template<typename T , if_t< std::is_trivially_constructible< T >::value > = 0>
ecs_xtor_t ctor (ecs_flags32_t &)
 
template<typename T , if_t< std::is_trivially_destructible< T >::value > = 0>
ecs_xtor_t dtor (ecs_flags32_t &)
 
template<typename T , if_t< std::is_trivially_copyable< T >::value > = 0>
ecs_copy_t copy (ecs_flags32_t &)
 
template<typename T , if_t< std::is_trivially_move_assignable< T >::value > = 0>
ecs_move_t move (ecs_flags32_t &)
 
template<typename T , if_t< std::is_trivially_copy_constructible< T >::value > = 0>
ecs_copy_t copy_ctor (ecs_flags32_t &)
 
template<typename T , if_t< std::is_trivially_move_constructible< T >::value > = 0>
ecs_move_t move_ctor (ecs_flags32_t &)
 
template<typename T , if_t< std::is_trivially_move_constructible< T >::value &&std::is_trivially_destructible< T >::value > = 0>
ecs_move_t ctor_move_dtor (ecs_flags32_t &)
 
template<typename T , if_t< std::is_trivially_move_assignable< T >::value &&std::is_trivially_destructible< T >::value > = 0>
ecs_move_t move_dtor (ecs_flags32_t &)
 
void entity_observer_create (flecs::world_t *world, flecs::entity_t event, flecs::entity_t entity, ecs_iter_action_t callback, void *callback_ctx, ecs_ctx_free_t callback_ctx_free)
 
template<typename T >
ecs_entity_t do_import (world &world, const char *symbol)
 
template<typename T >
flecs::entity import (world &world)
 
void system_init (flecs::world &world)
 
void timer_init (flecs::world &world)
 
template<typename E >
constexpr size_t enum_type_len ()
 
template<typename E , E C>
constexpr bool enum_constant_is_valid ()
 Test if value is valid for enumeration.
 
template<typename E , underlying_type_t< E > C>
constexpr bool enum_constant_is_valid_wrap ()
 
template<typename T , if_t< is_const_p< T >::value > = 0>
constexpr flecs::inout_kind_t type_to_inout ()
 
template<typename T , if_t< is_pointer< T >::value > = 0>
constexpr flecs::oper_kind_t type_to_oper ()
 
template<class Ty >
void destruct_obj (Ty *_ptr)
 
template<class Ty >
void free_obj (void *_ptr)
 

Variables

constexpr placement_new_tag_t placement_new_tag {}
 

Detailed Description

Int to enum.

Typedef Documentation

◆ alert_builder_base

template<typename ... Components>
using flecs::_::alert_builder_base
Initial value:
builder<
alert, ecs_alert_desc_t, alert_builder<Components...>,
alert_builder_i, Components ...>
struct ecs_alert_desc_t ecs_alert_desc_t
Alert descriptor, used with ecs_alert_init().

Definition at line 14 of file builder.hpp.

◆ event_from_func_t

template<typename Func >
using flecs::_::event_from_func_t = typename event_from_func<Func>::type

Definition at line 30 of file decl.hpp.

◆ observer_builder_base

template<typename ... Components>
using flecs::_::observer_builder_base
Initial value:
node_builder<
observer, ecs_observer_desc_t, observer_builder<Components...>,
observer_builder_i, Components ...>
struct ecs_observer_desc_t ecs_observer_desc_t
Used with ecs_observer_init().

Definition at line 14 of file builder.hpp.

◆ pipeline_builder_base

template<typename ... Components>
using flecs::_::pipeline_builder_base
Initial value:
builder<
pipeline, ecs_pipeline_desc_t, pipeline_builder<Components...>,
pipeline_builder_i, Components ...>
struct ecs_pipeline_desc_t ecs_pipeline_desc_t
Pipeline descriptor, used with ecs_pipeline_init().

Definition at line 14 of file builder.hpp.

◆ query_builder_base

template<typename ... Components>
using flecs::_::query_builder_base
Initial value:
builder<
query, ecs_query_desc_t, query_builder<Components...>,
query_builder_i, Components ...>
struct ecs_query_desc_t ecs_query_desc_t
Used with ecs_query_init().

Definition at line 14 of file builder.hpp.

◆ system_builder_base

template<typename ... Components>
using flecs::_::system_builder_base
Initial value:
node_builder<
system, ecs_system_desc_t, system_builder<Components...>,
system_builder_i, Components ...>
struct ecs_system_desc_t ecs_system_desc_t
Use with ecs_system_init() to create or update a system.

Definition at line 14 of file builder.hpp.

Function Documentation

◆ copy()

template<typename T , if_t< std::is_trivially_copyable< T >::value > = 0>
ecs_copy_t flecs::_::copy ( ecs_flags32_t & flags)

Definition at line 210 of file lifecycle_traits.hpp.

◆ copy_ctor()

template<typename T , if_t< std::is_trivially_copy_constructible< T >::value > = 0>
ecs_copy_t flecs::_::copy_ctor ( ecs_flags32_t & flags)

Definition at line 255 of file lifecycle_traits.hpp.

◆ copy_ctor_impl()

template<typename T >
void flecs::_::copy_ctor_impl ( void * dst_ptr,
const void * src_ptr,
int32_t count,
const ecs_type_info_t * info )

Definition at line 67 of file lifecycle_traits.hpp.

◆ copy_impl()

template<typename T >
void flecs::_::copy_impl ( void * dst_ptr,
const void * src_ptr,
int32_t count,
const ecs_type_info_t * info )

Definition at line 39 of file lifecycle_traits.hpp.

◆ ctor()

template<typename T , if_t< std::is_trivially_constructible< T >::value > = 0>
ecs_xtor_t flecs::_::ctor ( ecs_flags32_t & flags)

Definition at line 165 of file lifecycle_traits.hpp.

◆ ctor_impl()

template<typename T >
void flecs::_::ctor_impl ( void * ptr,
int32_t count,
const ecs_type_info_t * info )

Definition at line 17 of file lifecycle_traits.hpp.

◆ ctor_move_dtor()

template<typename T , if_t< std::is_trivially_move_constructible< T >::value &&std::is_trivially_destructible< T >::value > = 0>
ecs_move_t flecs::_::ctor_move_dtor ( ecs_flags32_t & flags)

Definition at line 301 of file lifecycle_traits.hpp.

◆ ctor_move_dtor_impl()

template<typename T >
void flecs::_::ctor_move_dtor_impl ( void * dst_ptr,
void * src_ptr,
int32_t count,
const ecs_type_info_t * info )

Definition at line 96 of file lifecycle_traits.hpp.

◆ destruct_obj()

template<class Ty >
void flecs::_::destruct_obj ( Ty * _ptr)
inline

Definition at line 48 of file utils.hpp.

◆ do_import()

template<typename T >
ecs_entity_t flecs::_::do_import ( world & world,
const char * symbol )

Definition at line 13 of file impl.hpp.

◆ dtor()

template<typename T , if_t< std::is_trivially_destructible< T >::value > = 0>
ecs_xtor_t flecs::_::dtor ( ecs_flags32_t & flags)

Definition at line 187 of file lifecycle_traits.hpp.

◆ dtor_impl()

template<typename T >
void flecs::_::dtor_impl ( void * ptr,
int32_t count,
const ecs_type_info_t * info )

Definition at line 28 of file lifecycle_traits.hpp.

◆ entity_observer_create()

void flecs::_::entity_observer_create ( flecs::world_t * world,
flecs::entity_t event,
flecs::entity_t entity,
ecs_iter_action_t callback,
void * callback_ctx,
ecs_ctx_free_t callback_ctx_free )
inline

Definition at line 25 of file impl.hpp.

◆ enum_constant_is_valid()

template<typename E , E C>
constexpr bool flecs::_::enum_constant_is_valid ( )
constexpr

Test if value is valid for enumeration.

This function leverages that when a valid value is provided, PRETTY_FUNCTION contains the enumeration name, whereas if a value is invalid, the string contains a number or a negative (-) symbol.

Definition at line 148 of file enum.hpp.

◆ enum_constant_is_valid_wrap()

template<typename E , underlying_type_t< E > C>
constexpr bool flecs::_::enum_constant_is_valid_wrap ( )
constexpr

Definition at line 156 of file enum.hpp.

◆ enum_type_len()

template<typename E >
constexpr size_t flecs::_::enum_type_len ( )
constexpr

Definition at line 109 of file enum.hpp.

◆ free_obj()

template<class Ty >
void flecs::_::free_obj ( void * _ptr)
inline

Definition at line 49 of file utils.hpp.

◆ import()

template<typename T >
flecs::entity flecs::_::import ( world & world)

Definition at line 45 of file impl.hpp.

◆ move()

template<typename T , if_t< std::is_trivially_move_assignable< T >::value > = 0>
ecs_move_t flecs::_::move ( ecs_flags32_t & flags)

Definition at line 233 of file lifecycle_traits.hpp.

◆ move_ctor()

template<typename T , if_t< std::is_trivially_move_constructible< T >::value > = 0>
ecs_move_t flecs::_::move_ctor ( ecs_flags32_t & flags)

Definition at line 278 of file lifecycle_traits.hpp.

◆ move_ctor_impl()

template<typename T >
void flecs::_::move_ctor_impl ( void * dst_ptr,
void * src_ptr,
int32_t count,
const ecs_type_info_t * info )

Definition at line 81 of file lifecycle_traits.hpp.

◆ move_dtor()

template<typename T , if_t< std::is_trivially_move_assignable< T >::value &&std::is_trivially_destructible< T >::value > = 0>
ecs_move_t flecs::_::move_dtor ( ecs_flags32_t & flags)

Definition at line 328 of file lifecycle_traits.hpp.

◆ move_dtor_impl()

template<typename T , if_not_t< std::is_trivially_move_assignable< T >::value > = 0>
void flecs::_::move_dtor_impl ( void * dst_ptr,
void * src_ptr,
int32_t count,
const ecs_type_info_t * info )

Definition at line 113 of file lifecycle_traits.hpp.

◆ move_impl()

template<typename T >
void flecs::_::move_impl ( void * dst_ptr,
void * src_ptr,
int32_t count,
const ecs_type_info_t * info )

Definition at line 53 of file lifecycle_traits.hpp.

◆ register_lifecycle_actions()

template<typename T , enable_if_t< std::is_trivial< T >::value==true > * = nullptr>
void flecs::_::register_lifecycle_actions ( ecs_world_t * world,
ecs_entity_t component )

Definition at line 92 of file component.hpp.

◆ symbol_name()

template<typename T >
const char * flecs::_::symbol_name ( )
inline

Definition at line 47 of file component.hpp.

◆ symbol_name< double >()

template<>
const char * flecs::_::symbol_name< double > ( )
inline

Definition at line 81 of file component.hpp.

◆ symbol_name< float >()

template<>
const char * flecs::_::symbol_name< float > ( )
inline

Definition at line 78 of file component.hpp.

◆ symbol_name< int16_t >()

template<>
const char * flecs::_::symbol_name< int16_t > ( )
inline

Definition at line 69 of file component.hpp.

◆ symbol_name< int32_t >()

template<>
const char * flecs::_::symbol_name< int32_t > ( )
inline

Definition at line 72 of file component.hpp.

◆ symbol_name< int64_t >()

template<>
const char * flecs::_::symbol_name< int64_t > ( )
inline

Definition at line 75 of file component.hpp.

◆ symbol_name< int8_t >()

template<>
const char * flecs::_::symbol_name< int8_t > ( )
inline

Definition at line 66 of file component.hpp.

◆ symbol_name< uint16_t >()

template<>
const char * flecs::_::symbol_name< uint16_t > ( )
inline

Definition at line 57 of file component.hpp.

◆ symbol_name< uint32_t >()

template<>
const char * flecs::_::symbol_name< uint32_t > ( )
inline

Definition at line 60 of file component.hpp.

◆ symbol_name< uint64_t >()

template<>
const char * flecs::_::symbol_name< uint64_t > ( )
inline

Definition at line 63 of file component.hpp.

◆ symbol_name< uint8_t >()

template<>
const char * flecs::_::symbol_name< uint8_t > ( )
inline

Definition at line 54 of file component.hpp.

◆ timer_init()

void flecs::_::timer_init ( flecs::world & world)
inline

Definition at line 99 of file impl.hpp.

◆ type_to_inout()

template<typename T , if_t< is_const_p< T >::value > = 0>
constexpr flecs::inout_kind_t flecs::_::type_to_inout ( )
constexpr

Definition at line 14 of file signature.hpp.

◆ type_to_oper()

template<typename T , if_t< is_pointer< T >::value > = 0>
constexpr flecs::oper_kind_t flecs::_::type_to_oper ( )
constexpr

Definition at line 30 of file signature.hpp.

Variable Documentation

◆ placement_new_tag

constexpr placement_new_tag_t flecs::_::placement_new_tag {}
constexpr

Definition at line 47 of file utils.hpp.