Navigation
API > API/Runtime > API/Runtime/uLangCore > API/Runtime/uLangCore/uLang > API/Runtime/uLangCore/uLang/Common > API/Runtime/uLangCore/uLang/Common/Containers
Inheritance Hierarchy
- TFunctionRefBase
- TUniqueFunction
References
| Module | uLangCore |
| Header | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Containers/Function.h |
| Include | #include "uLang/Common/Containers/Function.h" |
Syntax
template<typename FuncType>
class TUniqueFunction : public uLang::Private::TFunctionRefBase< Private::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 | |
|---|---|---|---|
| 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 | |
|---|---|---|---|
| ULANG_FORCEINLINE | Tests if the TUniqueFunction is callable. | ||
| TUniqueFunction & | operator=
(
TUniqueFunction&& Other |
Copy/move assignment operator. | |
| TUniqueFunction & | operator=
(
const TUniqueFunction& Other |
Typedefs
| Name | Description |
|---|---|
| Super |