Navigation
API > API/Runtime > API/Runtime/uLangCore
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
| Name | TUniqueFunction |
| Type | class |
| Header File | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Containers/Function.h |
| Include Path | #include "uLang/Common/Containers/Function.h" |
Syntax
template<typename FuncType>
class TUniqueFunction : public uLang::Private::TFunctionRefBase< Private::TFunctionStorage< true >, FuncType >
Inheritance Hierarchy
- TFunctionRefBase → TUniqueFunction
- TUniqueFunction
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TUniqueFunction
(
NullPtrType |
Default constructor. | uLang/Common/Containers/Function.h | |
TUniqueFunction
(
FunctorType&& InFunc |
Constructor which binds a TFunction to any function object. | uLang/Common/Containers/Function.h | |
TUniqueFunction
(
TFunction< FuncType >&& Other |
Constructor which takes ownership of a TFunction's functor. | uLang/Common/Containers/Function.h | |
TUniqueFunction
(
const TFunction< FuncType >& Other |
Constructor which takes ownership of a TFunction's functor. | uLang/Common/Containers/Function.h | |
| uLang/Common/Containers/Function.h | |||
TUniqueFunction
(
const TUniqueFunction& Other |
uLang/Common/Containers/Function.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TUniqueFunction() |
uLang/Common/Containers/Function.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Super | Private::TFunctionRefBase< Private::TFunctionStorage< true >, FuncType > | uLang/Common/Containers/Function.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Reset() |
Removes any bound callable from the TFunction, restoring it to the default 'empty' state. | uLang/Common/Containers/Function.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINE operator bool() |
Tests if the TUniqueFunction is callable. | uLang/Common/Containers/Function.h | |
TUniqueFunction & operator=
(
TUniqueFunction&& Other |
Copy/move assignment operator. | uLang/Common/Containers/Function.h | |
TUniqueFunction & operator=
(
const TUniqueFunction& Other |
uLang/Common/Containers/Function.h |