AUI Framework
master
Cross-platform module-based framework for developing C++20 desktop applications
|
Helper class to construct AFuture values. More...
Helper class to construct AFuture values.
T | future type AFuture<T> (void is default) |
AComplexFutureOperation is used to handle results and errors of multiple sequential futures.
AComplexFutureOperation is intended to construct a future with makeFuture(). makeFuture() must be called.
If AComplexFutureOperation get destroyed, it reports error to it's future if it does not have a result. AComplexFutureOperation should be carried with AFuture::onSuccess callbacks of other futures or any other callback-based structure, hence the destruction without result is treated as an error.
Classes | |
class | NoValueException |
Public Member Functions | |
AFuture< T > | makeFuture () noexcept |
Creates AFuture<T> object for this operation. More... | |
template<typename OtherT > | |
AComplexFutureOperation & | operator<< (AFuture< OtherT > rhs) |
Adds a direct dependency on other AFuture<T>. More... | |
void | supplyValue (T value) |
Pushes the result of operation to it's AFuture<T>. More... | |
void | supplyException () |
Pushes the result of operation to it's AFuture<T>. | |
|
inlinenoexcept |
Creates AFuture<T> object for this operation.
AFuture<T> can be created only once.
|
inline |
Adds a direct dependency on other AFuture<T>.
rhs | other future |
Stores other AFuture to internal AAsyncHolder storage. Passes rhs's onError calls to AComplexFutureOperation's future, if it does not have result (!AFuture::hasResult()).
|
inline |
Pushes the result of operation to it's AFuture<T>.
value | operation |
#include <AUI/Thread/AComplexFutureOperation.h>