Navigation
API > API/Runtime > API/Runtime/Core
Delegate registration class. A function can expose this base class to users to let them bind against, but without letting them execute. This gives us the benefit of C# events.
Example:
struct FInterestingThing { public: TDelegateRegistration
private: mutable TDelegate
void Func(const FInterestingThing& Thing) { // Binding and unbinding are allowed Thing.OnInterestingThing().BindLambda([](){ RespondToInterestingThing(); }); Thing.OnInterestingThing().Unbind();
// Execute is not Thing.OnInterestingThing().Execute(); // error: Execute is deleted }
| Name | TDelegateRegistration |
| 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 TDelegateRegistration