11 template <typename T, if_t< is_const_p<T>::value > = 0>
12 constexpr flecs::inout_kind_t type_to_inout() {
16 template <typename T, if_t< is_reference<T>::value > = 0>
17 constexpr flecs::inout_kind_t type_to_inout() {
21 template <
typename T, if_not_t<
22 is_const_p<T>::value || is_reference<T>::value > = 0>
23 constexpr flecs::inout_kind_t type_to_inout() {
24 return flecs::InOutDefault;
27 template <typename T, if_t< is_pointer<T>::value > = 0>
28 constexpr flecs::oper_kind_t type_to_oper() {
29 return flecs::Optional;
32 template <typename T, if_not_t< is_pointer<T>::value > = 0>
33 constexpr flecs::oper_kind_t type_to_oper() {
37 template <
typename ... Components>
42 , inout ({ (type_to_inout<Components>())... })
43 , oper ({ (type_to_oper<Components>())... })
46 flecs::world_t *world_;
48 flecs::array<flecs::inout_kind_t,
sizeof...(Components)> inout;
49 flecs::array<flecs::oper_kind_t,
sizeof...(Components)> oper;
51 template <
typename Builder>
52 void populate(
const Builder& b) {
55 if (!(
id & ECS_ID_FLAGS_MASK)) {
68 ECS_INVALID_PARAMETER,
69 "use with() method to add union relationship");
73 b->with(
id).inout(inout[i]).oper(oper[i]);
#define ecs_assert(condition, error_code,...)
Assert.
const ecs_type_info_t * ecs_get_type_info(const ecs_world_t *world, ecs_id_t id)
Get the type for an id.
bool ecs_has_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Test if an entity has an id.
Type that contains component information (passed to ctors/dtors/...)
ecs_size_t size
Size of type.