![]() |
MCRO
C++23 utilities for Unreal Engine.
|
Namespaces | |
| namespace | InferDelegate |
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. | |
Data Structures | |
| struct | FEventPolicy |
| Settings for the TEventDelegate class, which defines optional behavior when adding a binding to it. More... | |
| struct | TDynamicMethodPtr_Struct |
| struct | TDynamicMethodPtr_Struct< Dynamic > |
| struct | TDynamicSignature_Struct |
| struct | TDynamicSignature_Struct< Dynamic > |
| class | TEventDelegate |
| "Extension" of a common TMulticastDelegate. It allows to define optional "flags" when adding a binding, in order to: More... | |
| class | TEventDelegate< void(Args...), DefaultPolicy > |
| "Extension" of a common TMulticastDelegate. It allows to define optional "flags" when adding a binding, in order to: More... | |
| struct | TNative_Struct |
| struct | TNative_Struct< Dynamic > |
| struct | TNativeEvent_Struct |
| Map the input dynamic multicast delegate to a conceptually compatible native event delegate type. More... | |
Concepts | |
| concept | CDynamicDelegate |
| Constraint given type to a dynamic delegate class. | |
| concept | CDynamicMulticastDelegate |
| Constraint given type to a dynamic multicast delegate class. | |
Typedefs | |
| template<typename Signature , FEventPolicy DefaultPolicy = {}> | |
| using | TRetainingEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.CacheViaCopy = true})> |
| Shorthand alias for TEventDelegate which copies arguments to its cache regardless of their qualifiers. | |
| template<typename Signature , FEventPolicy DefaultPolicy = {}> | |
| using | TBelatedEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Belated = true})> |
| Shorthand alias for TEventDelegate which broadcasts listeners immediately once they're added. | |
| template<typename Signature , FEventPolicy DefaultPolicy = {}> | |
| using | TBelatedRetainingEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Belated = true, .CacheViaCopy = true})> |
| Shorthand alias for combination of TRetainingEventDelegate and TBelatedEventDelegate. | |
| template<typename Signature , FEventPolicy DefaultPolicy = {}> | |
| using | TOneTimeEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Once = true})> |
| Shorthand alias for TEventDelegate which broadcasts listeners only once and then they're removed. | |
| template<typename Signature , FEventPolicy DefaultPolicy = {}> | |
| using | TOneTimeRetainingEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Once = true, .CacheViaCopy = true})> |
| Shorthand alias for combination of TRetainingEventDelegate and TOneTimeEventDelegate. | |
| template<typename Signature , FEventPolicy DefaultPolicy = {}> | |
| using | TOneTimeBelatedEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Once = true, .Belated = true})> |
| Shorthand alias for combination of TBelatedEventDelegate and TOneTimeEventDelegate. | |
| template<typename Signature , FEventPolicy DefaultPolicy = {}> | |
| using | TOneTimeRetainingBelatedEventDelegate |
| Collect'em all. | |
| template<typename Dynamic , FEventPolicy DefaultPolicy = {}> | |
| using | TNativeEvent = typename TNativeEvent_Struct<Dynamic, DefaultPolicy>::Type |
| Map the input dynamic multicast delegate to a conceptually compatible native event delegate type. | |
| template<CFunctionLike Function, typename... Captures> | |
| using | TInferredDelegate |
| Infer a delegate type from an input function signature and a list of captures. | |
| template<typename Dynamic > | |
| using | TDynamicMethodPtr = typename TDynamicMethodPtr_Struct<std::decay_t<Dynamic>>::Type |
| Get the native function pointer type compatible with given dynamic (multicast) delegate. | |
| template<typename Dynamic > | |
| using | TDynamicSignature = typename TDynamicSignature_Struct<std::decay_t<Dynamic>>::Type |
| Get the native function signature type compatible with given dynamic (multicast) delegate. | |
| template<typename Dynamic > | |
| using | TNative = typename TNative_Struct<std::decay_t<Dynamic>>::Type |
| Map the input dynamic (multicast) delegate to a conceptually compatible native (multicast) delegate type. | |
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 CSameAsDecayed<MethodPtrTypeDynamic, MethodPtrTypeNative> | |
| NativeDelegateType | AsNative (Dynamic &&dynamicDelegate) |
| Creates a native delegate that is bound to the same UFunction as the specified dynamic delegate. | |
| using Mcro::Delegates::TBelatedEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Belated = true})> |
Shorthand alias for TEventDelegate which broadcasts listeners immediately once they're added.
Definition at line 386 of file EventDelegate.h.
| using Mcro::Delegates::TBelatedRetainingEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Belated = true, .CacheViaCopy = true})> |
Shorthand alias for combination of TRetainingEventDelegate and TBelatedEventDelegate.
Definition at line 390 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 |
Infer a delegate type from an input function signature and a list of captures.
The resulting delegate signature will trim the "Captures" from the input function signature. This is used in From overloads to allow binding functions with extra arguments to a delegate which has fewer (as the vanilla Unreal delegates API allows to do so)
| using Mcro::Delegates::TNative = typename TNative_Struct<std::decay_t<Dynamic>>::Type |
| using Mcro::Delegates::TNativeEvent = typename TNativeEvent_Struct<Dynamic, DefaultPolicy>::Type |
Map the input dynamic multicast delegate to a conceptually compatible native event delegate type.
Definition at line 419 of file EventDelegate.h.
| using Mcro::Delegates::TOneTimeBelatedEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Once = true, .Belated = true})> |
Shorthand alias for combination of TBelatedEventDelegate and TOneTimeEventDelegate.
Definition at line 402 of file EventDelegate.h.
| using Mcro::Delegates::TOneTimeEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Once = true})> |
Shorthand alias for TEventDelegate which broadcasts listeners only once and then they're removed.
Definition at line 394 of file EventDelegate.h.
| using Mcro::Delegates::TOneTimeRetainingBelatedEventDelegate |
Collect'em all.
Definition at line 406 of file EventDelegate.h.
| using Mcro::Delegates::TOneTimeRetainingEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.Once = true, .CacheViaCopy = true})> |
Shorthand alias for combination of TRetainingEventDelegate and TOneTimeEventDelegate.
Definition at line 398 of file EventDelegate.h.
| using Mcro::Delegates::TRetainingEventDelegate = TEventDelegate<Signature, DefaultPolicy.With({.CacheViaCopy = true})> |
Shorthand alias for TEventDelegate which copies arguments to its cache regardless of their qualifiers.
Definition at line 382 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:
| 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 63 of file AsNative.h.