53 template <CFunctionPtr Function,
typename... Captures>
54 requires (!CFunction_IsMember<Function>)
55 && (!CFunctorObject<Function>)
67 template <CFunctorObject Function>
68 TDelegate<TFunction_Signature<Function>>
From(Function&& func)
70 return TDelegate<TFunction_Signature<Function>>::CreateLambda(
FWD(func));
80 template <CSharedRef Object, CFunctorObject Function>
81 TDelegate<TFunction_Signature<Function>>
From(Object
const& self, Function&& func)
83 return TDelegate<TFunction_Signature<Function>>::CreateSPLambda(self,
FWD(func));
93 template <CSharedFromThis Object, CFunctorObject Function>
94 TDelegate<TFunction_Signature<Function>>
From(Object* self, Function&& func)
96 return TDelegate<TFunction_Signature<Function>>::CreateSPLambda(self,
FWD(func));
106 template <CSharedFromThis Object, CFunctorObject Function>
107 TDelegate<TFunction_Signature<Function>>
From(
const Object* self, Function&& func)
109 return TDelegate<TFunction_Signature<Function>>::CreateSPLambda(self,
FWD(func));
119 template <CPlainClass Object, CFunctionPtr Function,
typename... Captures>
120 requires CFunction_IsMember<Function>
133 template <CPlainClass Object, CFunctionPtr Function,
typename... Captures>
134 requires CFunction_IsMember<Function>
147 template <CSharedRef Object, CFunctionPtr Function,
typename... Captures>
148 requires CFunction_IsMember<Function>
161 template <CSharedFromThis Object, CFunctionPtr Function,
typename... Captures>
162 requires CFunction_IsMember<Function>
163 TInferredDelegate<Function, Captures...>
From(Object* self, Function func,
const Captures&... captures)
175 template <CSharedFromThis Object, CFunctionPtr Function,
typename... Captures>
176 requires CFunction_IsMember<Function>
177 TInferredDelegate<Function, Captures...>
From(
const Object* self, Function func,
const Captures&... captures)
179 return TInferredDelegate<Function, Captures...>::CreateSP(self, func, captures...);
189 template <CUObject Object, CFunctorObject Function>
190 TDelegate<TFunction_Signature<Function>>
From(Object* self, Function&& func)
192 return TDelegate<TFunction_Signature<Function>>::CreateWeakLambda(self,
FWD(func));
202 template <CUObject Object, CFunctionPtr Function,
typename... Captures>
203 requires CFunction_IsMember<Function>
204 TInferredDelegate<Function, Captures...>
From(Object* self, Function func,
const Captures&... captures)
206 return TInferredDelegate<Function, Captures...>::CreateUObject(self, func, captures...);
216 template <CUObject Object, CFunctionPtr Function,
typename... Captures>
217 requires CFunction_IsMember<Function>
218 TInferredDelegate<Function, Captures...>
From(
const Object* self, Function func,
const Captures&... captures)
220 return TInferredDelegate<Function, Captures...>::CreateUObject(self, func, captures...);
230 template <CUObject Object, CFunctionPtr Function,
typename... Captures>
231 requires CFunction_IsMember<Function>
243 template <
typename... Args>
244 TDelegate<void(Args...)>
From(TMulticastDelegate<
void(Args...)>& multicast)
246 return From([&](Args... args)
248 multicast.Broadcast(args...);
259 template <
typename Object,
typename... Args>
260 TDelegate<void(Args...)>
From(Object&& self, TMulticastDelegate<
void(Args...)>& multicast)
262 return From(
FWD(self), [&](Args... args)
264 multicast.Broadcast(args...);
275 multicast.Broadcast(args...);
284 multicast.Broadcast(args...);
296 template <CDynamicMulticastDelegate Dynamic>
301 std::make_index_sequence<
316 template <
typename Object, CDynamicMulticastDelegate Dynamic>
320 FWD(self), multicast,
321 std::make_index_sequence<
TDelegate< TFunctionFromTuple< TFunction_Return< Function >, TTrimEnd< sizeof...(Captures), TFunction_Arguments< Function > > >, FDefaultDelegateUserPolicy > TInferredDelegate
Infer a delegate type from an input function signature and a list of captures.