Navigation
API > API/Runtime > API/Runtime/Core
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 }
| Name | TMulticastDelegateRegistration |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl |
| Include Path | #include "Delegates/DelegateSignatureImpl.inl" |
Syntax
template<typename DelegateSignature, typename UserPolicy>
class TMulticastDelegateRegistration