|
AUI Framework
master
Cross-platform base for C++ UI apps
|
Helper class to construct AFuture values. More...
#include <AUI/Thread/AComplexFutureOperation.h>
Classes# | |
| class | NoValueException |
Public Member Functions# | |
| AFuture< T > | makeFuture () noexcept |
| Creates AFuture<T> object for this operation. | |
| template<typename OtherT> | |
| AComplexFutureOperation & | operator<< (AFuture< OtherT > rhs) |
| Adds a direct dependency on other AFuture<T>. | |
| void | supplyValue (T value) |
| Pushes the result of operation to it's AFuture<T>. | |
| void | supplyException () |
| Pushes the result of operation to it's AFuture<T>. | |
| 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.
|
inlinenodiscardnoexcept |
AFuture<T> can be created only once.
|
inline |
| 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.
|
inline |
| value | operation |