PLCnext API Documentation 25.0.2.69
|
Future object as proxy for return value an asynchronous function call More...
#include <Future.hpp>
Public Member Functions | |
Future ()=default | |
Constructs an invalid Future More... | |
Future (const Future &other)=default | |
Future (Future &&other) noexcept=default | |
Future & | operator= (const Future &other)=default |
Future & | operator= (Future &&other) noexcept=default |
T | GetValue () const |
Returns the value set by the associated Promise More... | |
![]() | |
FutureBase (const FutureBase &other)=default | |
FutureBase (FutureBase &&other) noexcept=default | |
FutureBase & | operator= (const FutureBase &other)=default |
FutureBase & | operator= (FutureBase &&other) noexcept=default |
bool | IsValid () const |
Returns true, if this Future has an assiciated Promise | |
bool | HasValue () const |
Returns true, if a value or an exception has been set | |
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 |
void | SetException (std::exception_ptr e) |
void | Clear (bool isValid) |
Future object as proxy for return value an asynchronous function call
|
default |
Constructs an invalid Future
The default constructor 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.
T Arp::System::Nm::Future< T >::GetValue | ( | void | ) | const |
Returns the value set by the associated Promise
This function may throws an exception if not value has been set. Use HasValue() to check it. If an exception was set by the Promise the exception is rethrown here.