Flecs: flecs::_ Namespace Reference
Description: A fast entity component system (ECS) for C & C++

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

Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
flecs::_ Namespace Reference
C++ API » Addons » Systems

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)
void | ecs_ctor_illegal (void *, int32_t, const ecs_type_info_t *ti)
void | ecs_dtor_illegal (void *, int32_t, const ecs_type_info_t *ti)
void | ecs_copy_illegal (void *, const void *, int32_t, const ecs_type_info_t *ti)
void | ecs_move_illegal (void *, void *, int32_t, const ecs_type_info_t *ti)
void | ecs_copy_ctor_illegal (void *, const void *, int32_t, const ecs_type_info_t *ti)
void | ecs_move_ctor_illegal (void *, void *, int32_t, const ecs_type_info_t *ti)
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 ()
template<typename T , if_t< std::is_trivially_destructible< T >::value > = 0>
ecs_xtor_t | dtor ()
template<typename T , if_t< std::is_trivially_copyable< T >::value > = 0>
ecs_copy_t | copy ()
template<typename T , if_t< std::is_trivially_move_assignable< T >::value > = 0>
ecs_move_t | move ()
template<typename T , if_t< std::is_trivially_copy_constructible< T >::value > = 0>
ecs_copy_t | copy_ctor ()
template<typename T , if_t< std::is_trivially_move_constructible< T >::value > = 0>
ecs_move_t | move_ctor ()
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 ()
template<typename T , if_t< std::is_trivially_move_assignable< T >::value &&std::is_trivially_destructible< T >::value > = 0>
ecs_move_t | move_dtor ()
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 (Ty *_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 ...>
ecs_alert_desc_t
struct ecs_alert_desc_t ecs_alert_desc_t
Alert descriptor, used with ecs_alert_init().
flecs::world::alert
flecs::alert_builder< Comps... > alert(Args &&... args) const
Create alert.

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 ...>
ecs_observer_desc_t
struct ecs_observer_desc_t ecs_observer_desc_t
Used with ecs_observer_init().
flecs::world::observer
flecs::observer observer(flecs::entity e) const
Observer builder.

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 ...>
ecs_pipeline_desc_t
struct ecs_pipeline_desc_t ecs_pipeline_desc_t
Pipeline descriptor, used with ecs_pipeline_init().
flecs::world::pipeline
flecs::pipeline_builder pipeline() const
Create a new pipeline.

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 ...>
ecs_query_desc_t
struct ecs_query_desc_t ecs_query_desc_t
Used with ecs_query_init().
flecs::world::query_builder
flecs::query_builder< Comps... > query_builder(Args &&... args) const
Create a query builder.
flecs::world::query
flecs::query< Comps... > query(Args &&... args) const
Create a query.

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 ...>
ecs_system_desc_t
struct ecs_system_desc_t ecs_system_desc_t
Use with ecs_system_init() to create or update a system.
flecs::world::system
flecs::system system(flecs::entity e) const
Upcast entity to 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 | ( |  | ) |

Definition at line 239 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 | ( |  | ) |

Definition at line 282 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 98 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 70 of file lifecycle_traits.hpp.

## ◆ ctor()

template<typename T , if_t< std::is_trivially_constructible< T >::value > = 0>

ecs_xtor_t flecs::_::ctor | ( |  | ) |

Definition at line 196 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 48 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 | ( |  | ) |

Definition at line 325 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 127 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 | ( |  | ) |

Definition at line 217 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 59 of file lifecycle_traits.hpp.

## ◆ ecs_copy_ctor_illegal()

void flecs::_::ecs_copy_ctor_illegal | ( | void * | ,
|  | const void * | ,
|  | int32_t | ,
|  | const ecs_type_info_t * | ti )
| inline

Definition at line 32 of file lifecycle_traits.hpp.

## ◆ ecs_copy_illegal()

void flecs::_::ecs_copy_illegal | ( | void * | ,
|  | const void * | ,
|  | int32_t | ,
|  | const ecs_type_info_t * | ti )
| inline

Definition at line 22 of file lifecycle_traits.hpp.

## ◆ ecs_ctor_illegal()

void flecs::_::ecs_ctor_illegal | ( | void * | ,
|  | int32_t | ,
|  | const ecs_type_info_t * | ti )
| inline

Definition at line 14 of file lifecycle_traits.hpp.

## ◆ ecs_dtor_illegal()

void flecs::_::ecs_dtor_illegal | ( | void * | ,
|  | int32_t | ,
|  | const ecs_type_info_t * | ti )
| inline

Definition at line 18 of file lifecycle_traits.hpp.

## ◆ ecs_move_ctor_illegal()

void flecs::_::ecs_move_ctor_illegal | ( | void * | ,
|  | void * | ,
|  | int32_t | ,
|  | const ecs_type_info_t * | ti )
| inline

Definition at line 38 of file lifecycle_traits.hpp.

## ◆ ecs_move_illegal()

void flecs::_::ecs_move_illegal | ( | void * | ,
|  | void * | ,
|  | int32_t | ,
|  | const ecs_type_info_t * | ti )
| inline

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>

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 146 of file enum.hpp.

## ◆ enum_constant_is_valid_wrap()

template<typename E , underlying_type_t< E > C>

bool flecs::_::enum_constant_is_valid_wrap | ( |  | ) |
| constexpr

Definition at line 154 of file enum.hpp.

## ◆ enum_type_len()

template<typename E >

size_t flecs::_::enum_type_len | ( |  | ) |
| constexpr

Definition at line 107 of file enum.hpp.

## ◆ free_obj()

template<class Ty >

void flecs::_::free_obj | ( | Ty * | _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 | ( |  | ) |

Definition at line 261 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 | ( |  | ) |

Definition at line 303 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 112 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 | ( |  | ) |

Definition at line 351 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 144 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 84 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>

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>

flecs::oper_kind_t flecs::_::type_to_oper | ( |  | ) |
| constexpr

Definition at line 30 of file signature.hpp.

## Variable Documentation

## ◆ placement_new_tag

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

Definition at line 47 of file utils.hpp.