UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TAsyncResult< ResultType > Class Template Reference

#include <AsyncResult.h>

Public Member Functions

 TAsyncResult ()
 
template<typename ArgType , typename = std::enable_if_t<std::is_same_v<ArgType, ResultType> && std::is_reference_v<const ArgType&>>>
 TAsyncResult (const ArgType &Result)
 
 TAsyncResult (TFuture< ResultType > &&InFuture, const TSharedPtr< IAsyncProgress > &InProgress, const TSharedPtr< IAsyncTask > &InTask)
 
 TAsyncResult (TAsyncResult &&Other)
 
TAsyncResultoperator= (TAsyncResult &&Other)
 
const TFuture< ResultType > & GetFuture () const
 
TSharedPtr< IAsyncProgressGetProgess () const
 
TSharedPtr< IAsyncTaskGetTask () const
 

Detailed Description

template<typename ResultType>
class TAsyncResult< ResultType >

Template for asynchronous return values.

Parameters
ResultTypeThe return value's type.

Constructor & Destructor Documentation

◆ TAsyncResult() [1/4]

template<typename ResultType >
TAsyncResult< ResultType >::TAsyncResult ( )
inline

Default constructor.

◆ TAsyncResult() [2/4]

template<typename ResultType >
template<typename ArgType , typename = std::enable_if_t<std::is_same_v<ArgType, ResultType> && std::is_reference_v<const ArgType&>>>
TAsyncResult< ResultType >::TAsyncResult ( const ArgType Result)
inline

Creates and initializes a new instance with the given synchronous result value. This constructor is only available for referenceable result types, to make 'void' a feasible result type for this template class.

Parameters
ResultThe result value to set.

◆ TAsyncResult() [3/4]

template<typename ResultType >
TAsyncResult< ResultType >::TAsyncResult ( TFuture< ResultType > &&  InFuture,
const TSharedPtr< IAsyncProgress > &  InProgress,
const TSharedPtr< IAsyncTask > &  InTask 
)
inline

Creates and initializes a new instance

Parameters
InFutureThe future to set.
InProgressThe progress object (optional).
InTaskThe task object object (optional).

◆ TAsyncResult() [4/4]

template<typename ResultType >
TAsyncResult< ResultType >::TAsyncResult ( TAsyncResult< ResultType > &&  Other)
inline

Move constructor.

Member Function Documentation

◆ GetFuture()

template<typename ResultType >
const TFuture< ResultType > & TAsyncResult< ResultType >::GetFuture ( ) const
inline

Gets the future that will hold the result.

Returns
The future.

◆ GetProgess()

template<typename ResultType >
TSharedPtr< IAsyncProgress > TAsyncResult< ResultType >::GetProgess ( ) const
inline

Get an object that indicates the progress of the task that is computing the result.

Returns
Task progress object, or nullptr if not available.

◆ GetTask()

template<typename ResultType >
TSharedPtr< IAsyncTask > TAsyncResult< ResultType >::GetTask ( ) const
inline

Get the asynchronous task that is computing the result.

Returns
Task object, or nullptr if not available.

◆ operator=()

template<typename ResultType >
TAsyncResult & TAsyncResult< ResultType >::operator= ( TAsyncResult< ResultType > &&  Other)
inline

Move assignment operator.


The documentation for this class was generated from the following file: