17 using IBase = IBuilder<Base, Components ...>;
27 entity_desc.
name = name;
28 entity_desc.
sep =
"::";
33 template <
typename Func>
36 typename std::decay<Func>::type>;
38 auto ctx = FLECS_NEW(Delegate)(FLECS_FWD(func));
39 desc_.run = Delegate::run;
41 desc_.run_ctx_free =
reinterpret_cast<
43 return T(world_, &desc_,
false);
46 template <
typename Func,
typename EachFunc>
47 T run(Func&& func, EachFunc&& each_func) {
49 typename std::decay<Func>::type>;
51 auto ctx = FLECS_NEW(Delegate)(FLECS_FWD(func));
52 desc_.run = Delegate::run;
54 desc_.run_ctx_free =
reinterpret_cast<
56 return each(FLECS_FWD(each_func));
59 template <
typename Func>
62 typename std::decay<Func>::type, Components...>;
65 auto ctx = FLECS_NEW(Delegate)(FLECS_FWD(func));
66 desc_.callback = Delegate::run;
67 desc_.callback_ctx = ctx;
68 desc_.callback_ctx_free =
reinterpret_cast<
70 return T(world_, &desc_,
true);
74 flecs::world_t* world_v()
override {
return world_; }
76 flecs::world_t *world_;