Navigation
Unreal Engine C++ API Reference > Runtime > Core > Templates
Inheritance Hierarchy
- TFunctionRefBase
- TUniqueFunction
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Templates/Function.h |
Include | #include "Templates/Function.h" |
Syntax
template<typename FuncType>
class TUniqueFunction : public UE::Core::Private::Function::TFunctionRefBase< UE::Core::Private::Function::TFunctionStorage< true >, FuncType >
Remarks
TUniqueFunction
See the class definition for intended usage.
TUniqueFunction
Used like TFunction above, but is move-only. This allows non-copyable functors to be bound to it.
Example:
TUniquePtr
TFunction
void Foo(TUniqueFunction
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
TUniqueFunction
(
TYPE_OF_NULLPTR |
Default constructor. | |
![]() |
TUniqueFunction
(
FunctorType&& InFunc |
Constructor which binds a TFunction to any function object. | |
![]() |
TUniqueFunction
(
TFunction< FuncType >&& Other |
Constructor which takes ownership of a TFunction's functor. | |
![]() |
TUniqueFunction
(
const TFunction< FuncType >& Other |
Constructor which takes ownership of a TFunction's functor. | |
![]() |
|||
![]() |
TUniqueFunction
(
const TUniqueFunction& Other |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Reset () |
Removes any bound callable from the TFunction, restoring it to the default 'empty' state. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FORCEINLINE | Tests if the TUniqueFunction is callable. | |
![]() |
TUniqueFunction & | operator=
(
TUniqueFunction&& Other |
Copy/move assignment operator. |
![]() |
TUniqueFunction & | operator=
(
const TUniqueFunction& Other |
Typedefs
Name | Description |
---|---|
Super |