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 =
reinterpret_cast<
42 return T(world_, &desc_);
45 template <
typename Func,
typename EachFunc>
46 T run(Func&& func, EachFunc&& each_func) {
48 typename std::decay<Func>::type>;
50 auto ctx = FLECS_NEW(Delegate)(FLECS_FWD(func));
51 desc_.run = Delegate::run;
53 desc_.run_ctx_free =
reinterpret_cast<
55 return each(FLECS_FWD(each_func));
58 template <
typename Func>
61 typename std::decay<Func>::type, Components...>;
62 auto ctx = FLECS_NEW(Delegate)(FLECS_FWD(func));
63 desc_.callback = Delegate::run;
64 desc_.callback_ctx = ctx;
65 desc_.callback_ctx_free =
reinterpret_cast<
67 return T(world_, &desc_);
71 flecs::world_t* world_v()
override {
return world_; }
73 flecs::world_t *world_;