13 template <typename T, if_t< is_const_p<T>::value > = 0>
14 constexpr flecs::inout_kind_t type_to_inout() {
18 template <typename T, if_t< is_reference<T>::value > = 0>
19 constexpr flecs::inout_kind_t type_to_inout() {
23 template <
typename T, if_not_t<
24 is_const_p<T>::value || is_reference<T>::value > = 0>
25 constexpr flecs::inout_kind_t type_to_inout() {
26 return flecs::InOutDefault;
29 template <typename T, if_t< is_pointer<T>::value > = 0>
30 constexpr flecs::oper_kind_t type_to_oper() {
31 return flecs::Optional;
34 template <typename T, if_not_t< is_pointer<T>::value > = 0>
35 constexpr flecs::oper_kind_t type_to_oper() {
39 template <
typename ... Components>
44 , inout ({ (type_to_inout<Components>())... })
45 , oper ({ (type_to_oper<Components>())... })
48 flecs::world_t *world_;
50 flecs::array<flecs::inout_kind_t,
sizeof...(Components)> inout;
51 flecs::array<flecs::oper_kind_t,
sizeof...(Components)> oper;
53 template <
typename Builder>
54 void populate(
const Builder& b) {
57 if (!(
id & ECS_ID_FLAGS_MASK)) {
70 ECS_INVALID_PARAMETER,
71 "use with() method to add union relationship");
75 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.