PLCnext API Documentation 24.0.0.71
|
Future object as proxy for return value an asynchronous function call More...
#include <Future.hpp>
Public Member Functions | |
Future () | |
Constructs an invalid Future More... | |
Future (const Future &other)=default | |
Future (Future &&other)=default | |
Future & | operator= (const Future &other)=default |
Future & | operator= (Future &&other)=default |
void | GetValue () const |
Gets the void result of the asynchronous function call More... | |
![]() | |
FutureBase (const FutureBase &other)=default | |
FutureBase (FutureBase &&other) noexcept=default | |
FutureBase & | operator= (const FutureBase &other)=default |
FutureBase & | operator= (FutureBase &&other) noexcept=default |
const bool | IsValid () const |
Returns true, if this Future has an assiciated Promise | |
const bool | HasValue () const |
Returns true, if a value or an exception has been set | |
const bool | HasException () const |
Returns true, if an exception has been set | |
Additional Inherited Members | |
![]() | |
virtual ImplBase & | GetPImpl ()=0 |
virtual const ImplBase & | GetPImpl () const =0 |
void | CheckForValueAndException () const |
template<typename ExceptionType > | |
void | SetException (const ExceptionType &e) |
void | Clear (bool isValid) |
Future object as proxy for return value an asynchronous function call
Arp::System::Nm::Future< void >::Future | ( | ) |
Constructs an invalid Future
The default contstructor is intended for Futures to be used as class members. Using copy or move constructors or assignments a class member can linked with a Promise.
void Arp::System::Nm::Future< void >::GetValue | ( | ) | const |
Gets the void result of the asynchronous function call
This function may throws an exception if the asynchronous funtion has not completed yet. Use HasValue() to check it. If an exception was set by the Promise the exception is rethrown here.