![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Future.h>
Public Member Functions | |
| TPromise () | |
| TPromise (TUniqueFunction< void()> &&CompletionCallback) | |
| TPromise (TPromise &&Other)=default | |
| TPromise (const TPromise &Other)=delete | |
| TPromise & | operator= (TPromise &&Other)=default |
| TPromise & | operator= (const TPromise &Other)=delete |
| ~TPromise () | |
| TFuture< ResultType > | GetFuture () |
| void | SetValue (const SetType &Result) |
| void | SetValue (SetType &&Result) |
| void | SetValue () |
| template<typename... ArgTypes> | |
| void | EmplaceValue (ArgTypes &&... Args) |
Protected Member Functions | |
| const TSharedPtr< StateType > & | GetState () |
Template for promises.
|
inline |
Default constructor (creates a new shared state).
|
inline |
Create and initialize a new instance with a callback.
| CompletionCallback | A function that is called when the future state is completed. |
|
default |
|
delete |
|
inline |
Sets the promised result.
The result must be set only once. An assertion will be triggered if this method is called a second time.
| Args | The arguments to forward to the constructor of the result. |
|
inlineprotected |
Gets the shared state object.
|
delete |
|
default |
|
inline |
Sets the promised result.
The result must be set only once. An assertion will be triggered if this method is called a second time.
| Result | The result value to set. |