![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Future.h>
Inheritance diagram for TFutureBase< ResultType >:Public Types | |
| using | MutableResultType = typename StateType::MutableResultType |
| using | ConstResultType = typename StateType::ConstResultType |
| using | RvalueResultType = typename StateType::RvalueResultType |
Public Member Functions | |
| ConstResultType | Get () const |
| ConstResultType | Get () const UE_LIFETIMEBOUND |
| bool | IsReady () const |
| bool | IsValid () const |
| void | Wait () const |
| bool | WaitFor (const FTimespan &Duration) const |
| bool | WaitUntil (const FDateTime &Time) const |
Protected Types | |
| using | StateType = TFutureState< ResultType > |
Protected Member Functions | |
| TFutureBase ()=default | |
| TFutureBase (TSharedPtr< StateType > &&InState) | |
| TFutureBase (const TSharedPtr< StateType > &InState) | |
| const TSharedPtr< StateType > & | GetState () const |
| template<typename Func > | |
| auto | Then (Func Continuation) |
| template<typename Func > | |
| auto | Next (Func Continuation) |
| void | Reset () |
Abstract base template for futures and shared futures.
| using TFutureBase< ResultType >::ConstResultType = typename StateType::ConstResultType |
| using TFutureBase< ResultType >::MutableResultType = typename StateType::MutableResultType |
| using TFutureBase< ResultType >::RvalueResultType = typename StateType::RvalueResultType |
|
protected |
|
protecteddefault |
Default constructor.
|
inlineprotected |
Creates and initializes a new instance.
| InState | The shared state to initialize with. |
|
inlineprotected |
|
inline |
Gets the future's result.
|
inline |
|
inlineprotected |
Gets the shared state object.
|
inline |
Checks whether this future object has its value set.
|
inline |
Checks whether this future object has a valid state.
|
protected |
Convenience wrapper for Then that set a completion callback that will be called once the future completes or immediately if already completed
| Continuation | a continuation taking an argument of type ResultType |
|
inlineprotected |
Reset the future. Resetting a future removes any continuation from its shared state and invalidates it. Useful for discarding yet to be completed future cleanly.
|
protected |
Set a completion callback that will be called once the future completes or immediately if already completed
| Continuation | a continuation taking an argument of type TFuture<ResultType> |
|
inline |
|
inline |
|
inline |