TDelegate< InRetValType(ParamTypes...), UserPolicy >

Windows
MacOS
Linux

Inheritance Hierarchy

FDelegateExtras

TDelegateBase

TDelegate< InRetValType(ParamTypes...), UserPolicy >

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Delegates/DelegateSignatureImpl.inl

Include

#include "Delegates/DelegateSignatureImpl.inl"

Syntax

template<typename InRetValType, typename... ParamTypes, typename UserPolicy>
class TDelegate< InRetValType(ParamTypes...), UserPolicy > : public TDelegateBase< UserPolicy >

Functions

Name Description

Public function

 

~TDelegate()

Destructor.

Public function

void

 

BindLambda

(
    FunctorType&& InFunctor,
    VarTypes... Vars
)

Static: Binds a C++ lambda delegate technically this works for any functor types, but lambdas are the primary use case

Public function

void

 

BindRaw

(
    const UserClass* InUserObject,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function

void

 

BindRaw

(
    UserClass* InUserObject,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Binds a raw C++ pointer delegate.

Public function

void

 

BindSP

(
    const UserClass* InUserObject,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function

void

 

BindSP

(
    UserClass* InUserObject,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Binds a shared pointer-based (fast, not thread-safe) member function delegate.

Public function

void

 

BindSP

(
    const TSharedRef < UserClass, ESPMod ...,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function

void

 

BindSP

(
    const TSharedRef < UserClass, ESPMod ...,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Binds a shared pointer-based (fast, not thread-safe) member function delegate.

Public function

void

 

BindStatic

(
    typename TBaseStaticDelegateInstanc ...,
    VarTypes... Vars
)

Binds a raw C++ pointer global function delegate

Public function

void

 

BindThreadSafeSP

(
    const UserClass* InUserObject,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function

void

 

BindThreadSafeSP

(
    const TSharedRef < UserClass, ESPMod ...,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function

void

 

BindThreadSafeSP

(
    const TSharedRef < UserClass, ESPMod ...,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Binds a shared pointer-based (slower, conditionally thread-safe) member function delegate.

Public function

void

 

BindThreadSafeSP

(
    UserClass* InUserObject,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Binds a shared pointer-based (slower, conditionally thread-safe) member function delegate.

Public function

void

 

BindUFunction

(
    UObjectTemplate* InUserObject,
    const FName & InFunctionName,
    VarTypes... Vars
)

Binds a UFunction-based member function delegate.

Public function

void

 

BindUObject

(
    const UserClass* InUserObject,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function

void

 

BindUObject

(
    UserClass* InUserObject,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Binds a UObject-based member function delegate.

Public function

void

 

BindWeakLambda

(
    UserClass* InUserObject,
    FunctorType&& InFunctor,
    VarTypes... Vars
)

Static: Binds a weak object C++ lambda delegate technically this works for any functor types, but lambdas are the primary use case

Public function Static

TDelegate < R ...

 

CreateLambda

(
    FunctorType&& InFunctor,
    VarTypes... Vars
)

Static: Creates a C++ lambda delegate technically this works for any functor types, but lambdas are the primary use case

Public function Static

TDelegate < R ...

 

CreateRaw

(
    const UserClass* InUserObject,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function Static

TDelegate < R ...

 

CreateRaw

(
    UserClass* InUserObject,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Static: Creates a raw C++ pointer member function delegate.

Public function Static

TDelegate < R ...

 

CreateSP

(
    const UserClass* InUserObject,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function Static

TDelegate < R ...

 

CreateSP

(
    UserClass* InUserObject,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Static: Creates a shared pointer-based (fast, not thread-safe) member function delegate.

Public function Static

TDelegate < R ...

 

CreateSP

(
    const TSharedRef < UserClass, ESPMod ...,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Static: Creates a shared pointer-based (fast, not thread-safe) member function delegate.

Public function Static

TDelegate < R ...

 

CreateSP

(
    const TSharedRef < UserClass, ESPMod ...,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function Static

TDelegate < R ...

 

CreateStatic

(
    typename TIdentity < RetValType (*...,
    VarTypes... Vars
)

Static: Creates a raw C++ pointer global function delegate

Public function Static

TDelegate < R ...

 

CreateThreadSafeSP

(
    const TSharedRef < UserClass, ESPMod ...,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Static: Creates a shared pointer-based (slower, conditionally thread-safe) member function delegate.

Public function Static

TDelegate < R ...

 

CreateThreadSafeSP

(
    const TSharedRef < UserClass, ESPMod ...,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function Static

TDelegate < R ...

 

CreateThreadSafeSP

(
    UserClass* InUserObject,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Static: Creates a shared pointer-based (slower, conditionally thread-safe) member function delegate.

Public function Static

TDelegate < R ...

 

CreateThreadSafeSP

(
    const UserClass* InUserObject,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function Static

TDelegate < R ...

 

CreateUFunction

(
    UObjectTemplate* InUserObject,
    const FName & InFunctionName,
    VarTypes... Vars
)

Static: Creates a UFunction-based member function delegate.

Public function Static

TDelegate < R ...

 

CreateUObject

(
    const UserClass* InUserObject,
    typename TMemFunPtrType < true, User...,
    VarTypes... Vars
)

Public function Static

TDelegate < R ...

 

CreateUObject

(
    UserClass* InUserObject,
    typename TMemFunPtrType < false, Use...,
    VarTypes... Vars
)

Static: Creates a UObject-based member function delegate.

Public function Static

TDelegate < R ...

 

CreateWeakLambda

(
    UserClass* InUserObject,
    FunctorType&& InFunctor,
    VarTypes... Vars
)

Static: Creates a weak object C++ lambda delegate technically this works for any functor types, but lambdas are the primary use case

Public function Const

RetValType

 

Execute

(
    ParamTypes... Params
)

Execute the delegate.

Public function Const

bool

 

ExecuteIfBound

(
    ParamTypes... Params
)

NOTE: Currently only delegates with no return value support ExecuteIfBound()

Protected function Const

DelegateInst ...

 

GetDelegateInstanceProtected()

Returns a pointer to the correctly-typed delegate instance.

Public function

 

TDelegate

(
    TDelegate && Other
)

Move constructor.

Public function

 

TDelegate()

Default constructor

Public function

 

TDelegate

(
    TYPE_OF_NULLPTR
)

'Null' constructor

Public function

 

TDelegate

(
    const TDelegate & Other
)

Creates and initializes a new instance from an existing delegate object.

Operators

Name Description

Public function

TDelegate &

 

operator=

(
    TDelegate && Other
)

Move assignment operator.

Public function

TDelegate &

 

operator=

(
    const TDelegate & Other
)

Assignment operator.

Classes

Name

Description

Public struct

FStaticDelegate

Declare the user's static function pointer delegate instance types.

Public struct

TRawMethodDelegate

Declare the user's C++ pointer-based delegate instance types.

Public struct

TRawMethodDelegate_Const

Public struct

TRawMethodDelegate_FourVars

Public struct

TRawMethodDelegate_FourVars_Const

Public struct

TRawMethodDelegate_OneVar

Public struct

TRawMethodDelegate_OneVar_Const

Public struct

TRawMethodDelegate_ThreeVars

Public struct

TRawMethodDelegate_ThreeVars_Const

Public struct

TRawMethodDelegate_TwoVars

Public struct

TRawMethodDelegate_TwoVars_Const

Public struct

TSPMethodDelegate

Declare the user's "fast" shared pointer-based delegate instance types.

Public struct

TSPMethodDelegate_Const

Public struct

TSPMethodDelegate_FourVars

Public struct

TSPMethodDelegate_FourVars_Const

Public struct

TSPMethodDelegate_OneVar

Public struct

TSPMethodDelegate_OneVar_Const

Public struct

TSPMethodDelegate_ThreeVars

Public struct

TSPMethodDelegate_ThreeVars_Const

Public struct

TSPMethodDelegate_TwoVars

Public struct

TSPMethodDelegate_TwoVars_Const

Public struct

TStaticDelegate_FourVars

Public struct

TStaticDelegate_OneVar

Public struct

TStaticDelegate_ThreeVars

Public struct

TStaticDelegate_TwoVars

Public struct

TThreadSafeSPMethodDelegate

Declare the user's "thread-safe" shared pointer-based delegate instance types.

Public struct

TThreadSafeSPMethodDelegate_Const

Public struct

TThreadSafeSPMethodDelegate_FourVars

Public struct

TThreadSafeSPMethodDelegate_FourVars_Const

Public struct

TThreadSafeSPMethodDelegate_OneVar

Public struct

TThreadSafeSPMethodDelegate_OneVar_Const

Public struct

TThreadSafeSPMethodDelegate_ThreeVars

Public struct

TThreadSafeSPMethodDelegate_ThreeVars_Const

Public struct

TThreadSafeSPMethodDelegate_TwoVars

Public struct

TThreadSafeSPMethodDelegate_TwoVars_Const

Public struct

TUFunctionDelegateBinding

Declare the user's UFunction-based delegate instance types.

Public struct

TUFunctionDelegateBinding_FourVars

Public struct

TUFunctionDelegateBinding_OneVar

Public struct

TUFunctionDelegateBinding_ThreeVars

Public struct

TUFunctionDelegateBinding_TwoVars

Public struct

TUObjectMethodDelegate

Declare the user's UObject-based delegate instance types.

Public struct

TUObjectMethodDelegate_Const

Public struct

TUObjectMethodDelegate_FourVars

Public struct

TUObjectMethodDelegate_FourVars_Const

Public struct

TUObjectMethodDelegate_OneVar

Public struct

TUObjectMethodDelegate_OneVar_Const

Public struct

TUObjectMethodDelegate_ThreeVars

Public struct

TUObjectMethodDelegate_ThreeVars_Const

Public struct

TUObjectMethodDelegate_TwoVars

Public struct

TUObjectMethodDelegate_TwoVars_Const

Typedefs

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback