MCRO
C++23 utilities for Unreal Engine.
Loading...
Searching...
No Matches
Mcro::Delegates::InferDelegate Namespace Reference

The extra layer of namespace InferDelegate is there for guarding common vocabulary (From) but still allowing the developer to use this namespace for a more terse syntax. More...

Namespaces

namespace  Detail
 

Functions

template<CFunctionPtr Function, typename... Captures>
requires (!CFunction_IsMember<Function>) && (!CFunctorObject<Function>)
TInferredDelegate< Function, Captures... > From (Function func, Captures &&... captures)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures.
 
template<CFunctorObject Function>
TDelegate< TFunction_Signature< Function > > From (Function &&func)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures.
 
template<CSharedRef Object, CFunctorObject Function>
TDelegate< TFunction_Signature< Function > > From (Object const &self, Function &&func)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.
 
template<CSharedFromThis Object, CFunctorObject Function>
TDelegate< TFunction_Signature< Function > > From (Object *self, Function &&func)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.
 
template<CSharedFromThis Object, CFunctorObject Function>
TDelegate< TFunction_Signature< Function > > From (const Object *self, Function &&func)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.
 
template<CPlainClass Object, CFunctionPtr Function, typename... Captures>
requires CFunction_IsMember<Function>
TInferredDelegate< Function, Captures... > From (Object *self, Function func, const Captures &... captures)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.
 
template<CPlainClass Object, CFunctionPtr Function, typename... Captures>
requires CFunction_IsMember<Function>
TInferredDelegate< Function, Captures... > From (const Object *self, Function func, const Captures &... captures)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.
 
template<CSharedRef Object, CFunctionPtr Function, typename... Captures>
requires CFunction_IsMember<Function>
TInferredDelegate< Function, Captures... > From (const Object &self, Function func, const Captures &... captures)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.
 
template<CUObject Object, CFunctionPtr Function, typename... Captures>
requires CFunction_IsMember<Function>
TInferredDelegate< Function, Captures... > From (TObjectPtr< Object > self, Function func, const Captures &... captures)
 Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.
 
template<typename... Args>
TDelegate< void(Args...)> From (TMulticastDelegate< void(Args...)> &multicast)
 Broadcast a multicast delegate when the returned delegate is executed.
 
template<typename Object , typename... Args>
TDelegate< void(Args...)> From (Object &&self, TMulticastDelegate< void(Args...)> &multicast)
 Broadcast a multicast delegate when the returned delegate is executed with a binding object.
 
template<CDynamicMulticastDelegate Dynamic>
TNative< typename Dynamic::FDelegate > From (Dynamic &multicast)
 Broadcast a dynamic multicast delegate when the returned delegate is executed.
 
template<typename Object , CDynamicMulticastDelegate Dynamic>
TNative< typename Dynamic::FDelegate > From (Object &&self, Dynamic &multicast)
 Broadcast a dynamic multicast delegate when the returned delegate is executed.
 

Detailed Description

The extra layer of namespace InferDelegate is there for guarding common vocabulary (From) but still allowing the developer to use this namespace for a more terse syntax.

Function Documentation

◆ From() [1/13]

template<CSharedRef Object, CFunctionPtr Function, typename... Captures>
requires CFunction_IsMember<Function>
TInferredDelegate< Function, Captures... > Mcro::Delegates::InferDelegate::From ( const Object & self,
Function func,
const Captures &... captures )

Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.

This overload is equivalent to TDelegate::CreateSP (TSharedRef)

Definition at line 149 of file DelegateFrom.h.

◆ From() [2/13]

template<CSharedFromThis Object, CFunctorObject Function>
TDelegate< TFunction_Signature< Function > > Mcro::Delegates::InferDelegate::From ( const Object * self,
Function && func )

Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.

This overload is equivalent to TDelegate::CreateSPLambda (TSharedFromThis const pointer)

Definition at line 107 of file DelegateFrom.h.

◆ From() [3/13]

template<CPlainClass Object, CFunctionPtr Function, typename... Captures>
requires CFunction_IsMember<Function>
TInferredDelegate< Function, Captures... > Mcro::Delegates::InferDelegate::From ( const Object * self,
Function func,
const Captures &... captures )

Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.

This overload is equivalent to TDelegate::CreateRaw (plain C++ const object pointer)

This overload is equivalent to TDelegate::CreateSP (TSharedFromThis const pointer)

This overload is equivalent to TDelegate::CreateUObject (UObject const pointer)

Definition at line 135 of file DelegateFrom.h.

◆ From() [4/13]

template<CDynamicMulticastDelegate Dynamic>
TNative< typename Dynamic::FDelegate > Mcro::Delegates::InferDelegate::From ( Dynamic & multicast)

Broadcast a dynamic multicast delegate when the returned delegate is executed.

Template Parameters
DynamicThe type of the input dynamic multicast delegate
Parameters
multicastinput dynamic multicast delegate
Todo
Captures... and bound object

Definition at line 297 of file DelegateFrom.h.

◆ From() [5/13]

template<CFunctorObject Function>
TDelegate< TFunction_Signature< Function > > Mcro::Delegates::InferDelegate::From ( Function && func)

Instead of specifying manually a delegate type, infer it from the input function and the extra captures.

This overload is equivalent to TDelegate::CreateLambda

Definition at line 68 of file DelegateFrom.h.

◆ From() [6/13]

template<CFunctionPtr Function, typename... Captures>
requires (!CFunction_IsMember<Function>) && (!CFunctorObject<Function>)
TInferredDelegate< Function, Captures... > Mcro::Delegates::InferDelegate::From ( Function func,
Captures &&... captures )

Instead of specifying manually a delegate type, infer it from the input function and the extra captures.

This overload is equivalent to TDelegate::CreateStatic

Definition at line 56 of file DelegateFrom.h.

◆ From() [7/13]

template<typename Object , CDynamicMulticastDelegate Dynamic>
TNative< typename Dynamic::FDelegate > Mcro::Delegates::InferDelegate::From ( Object && self,
Dynamic & multicast )

Broadcast a dynamic multicast delegate when the returned delegate is executed.

Template Parameters
DynamicThe type of the input dynamic multicast delegate
Parameters
selfany type of binding object other From overloads accept
multicastinput dynamic multicast delegate
Todo
Captures... and bound object

Definition at line 317 of file DelegateFrom.h.

◆ From() [8/13]

template<typename Object , typename... Args>
TDelegate< void(Args...)> Mcro::Delegates::InferDelegate::From ( Object && self,
TMulticastDelegate< void(Args...)> & multicast )

Broadcast a multicast delegate when the returned delegate is executed with a binding object.

Parameters
selfany type of binding object other From overloads accept
multicastinput multicast delegate
Todo
Captures... and bound object

Definition at line 260 of file DelegateFrom.h.

◆ From() [9/13]

template<CSharedFromThis Object, CFunctorObject Function>
TDelegate< TFunction_Signature< Function > > Mcro::Delegates::InferDelegate::From ( Object * self,
Function && func )

Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.

This overload is equivalent to TDelegate::CreateSPLambda (TSharedFromThis pointer)

This overload is equivalent to TDelegate::CreateWeakLambda (UObject)

Definition at line 94 of file DelegateFrom.h.

◆ From() [10/13]

template<CPlainClass Object, CFunctionPtr Function, typename... Captures>
requires CFunction_IsMember<Function>
TInferredDelegate< Function, Captures... > Mcro::Delegates::InferDelegate::From ( Object * self,
Function func,
const Captures &... captures )

Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.

This overload is equivalent to TDelegate::CreateRaw (plain C++ object pointer)

This overload is equivalent to TDelegate::CreateSP (TSharedFromThis pointer)

This overload is equivalent to TDelegate::CreateUObject (UObject pointer)

Definition at line 121 of file DelegateFrom.h.

◆ From() [11/13]

template<CSharedRef Object, CFunctorObject Function>
TDelegate< TFunction_Signature< Function > > Mcro::Delegates::InferDelegate::From ( Object const & self,
Function && func )

Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.

This overload is equivalent to TDelegate::CreateSPLambda (TSharedRef)

Definition at line 81 of file DelegateFrom.h.

◆ From() [12/13]

template<typename... Args>
TDelegate< void(Args...)> Mcro::Delegates::InferDelegate::From ( TMulticastDelegate< void(Args...)> & multicast)

Broadcast a multicast delegate when the returned delegate is executed.

Parameters
multicastinput multicast delegate
Todo
Captures... and bound object

Definition at line 244 of file DelegateFrom.h.

◆ From() [13/13]

template<CUObject Object, CFunctionPtr Function, typename... Captures>
requires CFunction_IsMember<Function>
TInferredDelegate< Function, Captures... > Mcro::Delegates::InferDelegate::From ( TObjectPtr< Object > self,
Function func,
const Captures &... captures )

Instead of specifying manually a delegate type, infer it from the input function and the extra captures. Also infer the method of object binding based on the type traits of the object argument.

This overload is equivalent to TDelegate::CreateUObject (TObjectPtr)

Definition at line 232 of file DelegateFrom.h.