Face Engine SDK
5.25.0
A face detection, recognition and tracking engine.
|
Promise class to support asynchronous data retrieval Look into std::promise semantics to understand it. More...
#include <Future.h>
Public Types | |
using | Error = PromiseError |
Alias for associated error type. | |
using | DataType = T |
Alias for stored data type. | |
Public Member Functions | |
Promise () noexcept | |
Constructor for empty Promise. | |
Promise (Promise &&) noexcept | |
Promise & | operator= (Promise &&) noexcept |
Result< Error > | cancel () noexcept |
Cancel method. Think of it as acceptance of cancel requested by. More... | |
Result< Error > | fail () noexcept |
Fail method. Think of it as valid failure to run some promised function. Only makes sense if underlying state is Promised. More... | |
Result< Error > | fulfill (DataType &&promisedData) noexcept |
Fulfill promise with data. Only makes sense if underlying state is Promised. More... | |
Future< DataType > | future (Result< Error > &error) noexcept |
Create tethered future object. Only makes sense if underlying state is Empty. More... | |
FuturePromiseState | state () const noexcept |
Returns current state of future-promise pair. More... | |
Static Public Member Functions | |
static void | swap (Promise &first, Promise &second) noexcept |
Static method that swaps internal data between two passed promises. | |
Promise class to support asynchronous data retrieval Look into std::promise semantics to understand it.
T | data type to store. |
|
noexcept |
Cancel method. Think of it as acceptance of cancel requested by.
|
noexcept |
|
noexcept |
|
noexcept |
Create tethered future object. Only makes sense if underlying state is Empty.
error | Reference to error object to indicate of failure |
|
noexcept |