MCRO
C++23 utilities for Unreal Engine.
|
Namespaces | |
namespace | Detail |
Data Structures | |
struct | TDynamicMethodPtr_Struct |
struct | TDynamicMethodPtr_Struct< Dynamic > |
struct | TDynamicSignature_Struct |
struct | TDynamicSignature_Struct< Dynamic > |
class | TEventDelegate |
class | TEventDelegate< void(Args...), DefaultInvokeMode > |
class | TEventMultiplex |
class | TEventMultiplex< Return(Args...)> |
class | TEventMultiplex< void(Args...)> |
struct | TNative_Struct |
struct | TNative_Struct< Dynamic > |
struct | TNativeEvent_Struct |
struct | TNativeMultiplex_Struct |
struct | TReturnOverride_Struct |
Concepts | |
concept | CDynamicDelegate |
concept | CDynamicMulticastDelegate |
Typedefs | |
template<CFunctionLike Function, typename... Captures> | |
using | TInferredDelegate |
template<typename Signature , int32 Flags = 0> | |
using | TRetainingEventDelegate = TEventDelegate<Signature, CopyArguments | Flags> |
template<typename Signature , int32 Flags = 0> | |
using | TBelatedEventDelegate = TEventDelegate<Signature, BelatedInvoke | Flags> |
template<typename Signature , int32 Flags = 0> | |
using | TBelatedRetainingEventDelegate = TEventDelegate<Signature, BelatedInvoke | CopyArguments | Flags> |
template<typename Signature , int32 Flags = 0> | |
using | TOneTimeEventDelegate = TEventDelegate<Signature, InvokeOnce | Flags> |
template<typename Signature , int32 Flags = 0> | |
using | TOneTimeRetainingEventDelegate = TEventDelegate<Signature, InvokeOnce | CopyArguments | Flags> |
template<typename Signature , int32 Flags = 0> | |
using | TOneTimeBelatedEventDelegate = TEventDelegate<Signature, InvokeOnce | BelatedInvoke | Flags> |
template<typename Signature , int32 Flags = 0> | |
using | TOneTimeRetainingBelatedEventDelegate |
template<typename Dynamic , int32 DefaultSettings = DefaultInvocation> | |
using | TNativeEvent = typename TNativeEvent_Struct<Dynamic, DefaultSettings>::Type |
template<typename Dynamic > | |
using | TReturnOverride = typename TReturnOverride_Struct<Dynamic>::Type |
template<typename Dynamic , typename Return = TReturnOverride<Dynamic>> | |
using | TNativeMultiplex = typename TNativeMultiplex_Struct<Dynamic, Return>::Type |
template<typename Dynamic > | |
using | TDynamicMethodPtr = typename TDynamicMethodPtr_Struct<std::decay_t<Dynamic>>::Type |
template<typename Dynamic > | |
using | TDynamicSignature = typename TDynamicSignature_Struct<std::decay_t<Dynamic>>::Type |
template<typename Dynamic > | |
using | TNative = typename TNative_Struct<std::decay_t<Dynamic>>::Type |
Enumerations | |
enum | EInvokeMode { DefaultInvocation = 0 , InvokeOnce = 1 << 0 , BelatedInvoke = 1 << 1 , CopyArguments = 1 << 2 , ThreadSafeEvent = 1 << 3 } |
Functions | |
template<CDynamicDelegate Dynamic, typename MethodPtrTypeDynamic = TDynamicMethodPtr<Dynamic>, typename NativeDelegateType = TDelegate<TFunction_Signature<MethodPtrTypeDynamic>>, typename MethodPtrTypeNative = typename TMemFunPtrType< false, FDeclareOnly, typename NativeDelegateType::TFuncType >::Type> requires CSameAs<MethodPtrTypeDynamic, MethodPtrTypeNative> | |
NativeDelegateType | AsNative (Dynamic &&dynamicDelegate) |
template<CFunctionLike Function, typename... Captures> requires (!TFunction_IsMember<Function>) && (!CFunctorObject<Function>) | |
TInferredDelegate< Function, Captures... > | From (Function func, const Captures &... captures) |
template<CFunctorObject Function> | |
TDelegate< TFunction_Signature< Function > > | From (Function &&func) |
template<CSharedRef Object, CFunctorObject Function> | |
TDelegate< TFunction_Signature< Function > > | From (const Object &self, Function &&func) |
template<CSharedFromThis Object, CFunctorObject Function> | |
TDelegate< TFunction_Signature< Function > > | From (Object *self, Function &&func) |
template<CSharedFromThis Object, CFunctorObject Function> | |
TDelegate< TFunction_Signature< Function > > | From (const Object *self, Function &&func) |
template<CPlainClass Object, CFunctionLike Function, typename... Captures> requires TFunction_IsMember<Function> && (!CFunctorObject<Function>) | |
TInferredDelegate< Function, Captures... > | From (Object *self, Function func, const Captures &... captures) |
template<CPlainClass Object, CFunctionLike Function, typename... Captures> requires TFunction_IsMember<Function> && (!CFunctorObject<Function>) | |
TInferredDelegate< Function, Captures... > | From (const Object *self, Function func, const Captures &... captures) |
template<CSharedRef Object, CFunctionLike Function, typename... Captures> requires TFunction_IsMember<Function> && (!CFunctorObject<Function>) | |
TInferredDelegate< Function, Captures... > | From (const Object &self, Function func, const Captures &... captures) |
template<typename... Args> | |
TDelegate< void(Args...)> | From (TMulticastDelegate< void(Args...)> &multicast) |
template<typename Object , typename... Args> | |
TDelegate< void(Args...)> | From (Object &&self, TMulticastDelegate< void(Args...)> &multicast) |
template<CDynamicMulticastDelegate Dynamic> | |
TNative< typename Dynamic::FDelegate > | From (Dynamic &multicast) |
template<typename Object , CDynamicMulticastDelegate Dynamic> | |
TNative< typename Dynamic::FDelegate > | From (Object &&self, Dynamic &multicast) |
using Mcro::Delegates::TBelatedEventDelegate = TEventDelegate<Signature, BelatedInvoke | Flags> |
Definition at line 344 of file EventDelegate.h.
using Mcro::Delegates::TBelatedRetainingEventDelegate = TEventDelegate<Signature, BelatedInvoke | CopyArguments | Flags> |
Definition at line 347 of file EventDelegate.h.
using Mcro::Delegates::TDynamicMethodPtr = typename TDynamicMethodPtr_Struct<std::decay_t<Dynamic>>::Type |
using Mcro::Delegates::TDynamicSignature = typename TDynamicSignature_Struct<std::decay_t<Dynamic>>::Type |
using Mcro::Delegates::TInferredDelegate |
Definition at line 44 of file DelegateFrom.h.
using Mcro::Delegates::TNative = typename TNative_Struct<std::decay_t<Dynamic>>::Type |
using Mcro::Delegates::TNativeEvent = typename TNativeEvent_Struct<Dynamic, DefaultSettings>::Type |
Map the input dynamic multicast delegate to a conceptually compatible native event delegate type
Definition at line 372 of file EventDelegate.h.
using Mcro::Delegates::TNativeMultiplex = typename TNativeMultiplex_Struct<Dynamic, Return>::Type |
Definition at line 159 of file EventMultiplex.h.
using Mcro::Delegates::TOneTimeBelatedEventDelegate = TEventDelegate<Signature, InvokeOnce | BelatedInvoke | Flags> |
Definition at line 356 of file EventDelegate.h.
using Mcro::Delegates::TOneTimeEventDelegate = TEventDelegate<Signature, InvokeOnce | Flags> |
Definition at line 350 of file EventDelegate.h.
using Mcro::Delegates::TOneTimeRetainingBelatedEventDelegate |
Definition at line 359 of file EventDelegate.h.
using Mcro::Delegates::TOneTimeRetainingEventDelegate = TEventDelegate<Signature, InvokeOnce | CopyArguments | Flags> |
Definition at line 353 of file EventDelegate.h.
using Mcro::Delegates::TRetainingEventDelegate = TEventDelegate<Signature, CopyArguments | Flags> |
Definition at line 341 of file EventDelegate.h.
using Mcro::Delegates::TReturnOverride = typename TReturnOverride_Struct<Dynamic>::Type |
Definition at line 142 of file EventMultiplex.h.
Settings for the TEventDelegate class, which defines optional behavior when adding a binding to it
Definition at line 26 of file EventDelegate.h.
NativeDelegateType Mcro::Delegates::AsNative | ( | Dynamic && | dynamicDelegate | ) |
Creates a native delegate that is bound to the same UFunction as the specified dynamic delegate.
The signatures of the functions are checked, so that it is not possible to compile a conversion that would crash at runtime.
Example Usage:
using FMyNativeDelegate = TDelegate<void(int32 someParam)>; DECLARE_DYNAMIC_DELEGATE_OneParam(FMyBlueprintDelegate, const int32, someParam); void MyNativeDelegateFunction(FMyNativeDelegate delegate) { ... } void MyBlueprintDelegateFunction(FMyBlueprintDelegate delegate) { MyNativeDelegateFunction(Delegates::AsNative(delegate)); }
Dynamic | The origin type, i.e. the dynamic delegate. Will be auto-deduced. |
NativeDelegateType | The target type, i.e. the delegate that you want to produce. Will be auto-deduced from Dynamic. |
dynamicDelegate | The dynamic delegate that will be converted |
Definition at line 60 of file AsNative.h.
TDelegate< TFunction_Signature< Function > > Mcro::Delegates::From | ( | const Object & | self, |
Function && | func ) |
Maps to CreateSPLambda
Definition at line 71 of file DelegateFrom.h.
TInferredDelegate< Function, Captures... > Mcro::Delegates::From | ( | const Object & | self, |
Function | func, | ||
const Captures &... | captures ) |
Maps to CreateSP
Definition at line 116 of file DelegateFrom.h.
TDelegate< TFunction_Signature< Function > > Mcro::Delegates::From | ( | const Object * | self, |
Function && | func ) |
Maps to CreateSPLambda (SharedFromThis)
Definition at line 85 of file DelegateFrom.h.
TInferredDelegate< Function, Captures... > Mcro::Delegates::From | ( | const Object * | self, |
Function | func, | ||
const Captures &... | captures ) |
Maps to CreateRaw
Maps to CreateSP (SharedFromThis)
Maps to CreateUObject
Definition at line 108 of file DelegateFrom.h.
TNative< typename Dynamic::FDelegate > Mcro::Delegates::From | ( | Dynamic & | multicast | ) |
Broadcast a dynamic multicast delegate when the returned delegate is executed.
Dynamic | The type of the input dynamic multicast delegate |
multicast | input dynamic multicast delegate |
Definition at line 215 of file DelegateFrom.h.
TDelegate< TFunction_Signature< Function > > Mcro::Delegates::From | ( | Function && | func | ) |
Maps to CreateLambda
Definition at line 64 of file DelegateFrom.h.
TInferredDelegate< Function, Captures... > Mcro::Delegates::From | ( | Function | func, |
const Captures &... | captures ) |
Maps to CreateStatic
Definition at line 57 of file DelegateFrom.h.
TNative< typename Dynamic::FDelegate > Mcro::Delegates::From | ( | Object && | self, |
Dynamic & | multicast ) |
Broadcast a dynamic multicast delegate when the returned delegate is executed.
Dynamic | The type of the input dynamic multicast delegate |
self | any type of binding object other From overloads accept |
multicast | input dynamic multicast delegate |
Definition at line 235 of file DelegateFrom.h.
TDelegate< void(Args...)> Mcro::Delegates::From | ( | Object && | self, |
TMulticastDelegate< void(Args...)> & | multicast ) |
Broadcast a multicast delegate when the returned delegate is executed with a binding object.
self | any type of binding object other From overloads accept |
multicast | input multicast delegate |
Definition at line 178 of file DelegateFrom.h.
TDelegate< TFunction_Signature< Function > > Mcro::Delegates::From | ( | Object * | self, |
Function && | func ) |
Maps to CreateSPLambda (SharedFromThis)
Maps to CreateWeakLambda
Definition at line 78 of file DelegateFrom.h.
TInferredDelegate< Function, Captures... > Mcro::Delegates::From | ( | Object * | self, |
Function | func, | ||
const Captures &... | captures ) |
Maps to CreateRaw
Maps to CreateSP (SharedFromThis)
Maps to CreateUObject
Definition at line 100 of file DelegateFrom.h.
TDelegate< void(Args...)> Mcro::Delegates::From | ( | TMulticastDelegate< void(Args...)> & | multicast | ) |
Broadcast a multicast delegate when the returned delegate is executed.
multicast | input multicast delegate |
Definition at line 162 of file DelegateFrom.h.