Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Delegates
References
| Module | Core |
| Header | /Engine/Source/Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl |
| Include | #include "Delegates/DelegateSignatureImpl.inl" |
Syntax
template<typename DelegateSignature, typename UserPolicy>
class TMulticastDelegateRegistration
Remarks
Multicast delegate registration class. A function can expose this base class to users to let them bind against, but without letting them broadcast. This gives us the benefit of C# events.
Example:
struct FInterestingThing { public: TMulticastDelegateRegistration
private: mutable TMulticastDelegate
void Func(const FInterestingThing& Thing) { // Registration and reregistration are allowed FDelegateHandle Handle = Thing.OnInterestingThing().Add({ RespondToInterestingThing(); }); Thing.OnInterestingThing().Remove(Handle);
// Broadcast is not Thing.OnInterestingThing().Broadcast(); // error: Broadcast is deleted }
Specializations
TMulticastDelegateRegistration< void(ParamTypes...), UserPolicy >