17 using IBase = IBuilder<Base, Components ...>;
26 entity_desc.
name = name;
27 entity_desc.
sep =
"::";
32 template <
typename Func>
35 typename std::decay<Func>::type>;
37 auto ctx = FLECS_NEW(Delegate)(FLECS_FWD(func));
38 desc_.run = Delegate::run;
40 desc_.run_ctx_free = _::free_obj<Delegate>;
41 return T(world_, &desc_);
44 template <
typename Func,
typename EachFunc>
45 T run(Func&& func, EachFunc&& each_func) {
47 typename std::decay<Func>::type>;
49 auto ctx = FLECS_NEW(Delegate)(FLECS_FWD(func));
50 desc_.run = Delegate::run;
52 desc_.run_ctx_free = _::free_obj<Delegate>;
53 return each(FLECS_FWD(each_func));
56 template <
typename Func>
59 typename std::decay<Func>::type, Components...>;
60 auto ctx = FLECS_NEW(Delegate)(FLECS_FWD(func));
61 desc_.callback = Delegate::run;
62 desc_.callback_ctx = ctx;
63 desc_.callback_ctx_free = _::free_obj<Delegate>;
64 return T(world_, &desc_);
68 flecs::world_t* world_v()
override {
return world_; }
70 flecs::world_t *world_;