#include <XrdClOperationHandlers.hh>
Public Member Functions | |
FutureWrapperBase (std::future< Response > &ftr) | |
~FutureWrapperBase () | |
Protected Member Functions | |
void | SetException (const XRootDStatus &err) |
Protected Attributes | |
std::promise< Response > | prms |
promise that corresponds to the future | |
bool | called |
true if the handler has been called, false otherwise |
A wrapper handler for a std::promise / std::future.
XrdCl::FutureWrapperBase< Response >::FutureWrapperBase | ( | std::future< Response > & | ftr | ) | [inline] |
Constructor, initializes the std::future argument from its own std::promise
ftr | : the future to be linked with this handler |
XrdCl::FutureWrapperBase< Response >::~FutureWrapperBase | ( | ) | [inline] |
Destructor
If the handler was not called sets an exception in the promise
void XrdCl::FutureWrapperBase< Response >::SetException | ( | const XRootDStatus & | err | ) | [inline, protected] |
Set exception in the std::promise / std::future
err | : the error |
Referenced by XrdCl::FutureWrapper< void >::HandleResponse(), XrdCl::FutureWrapper< Response >::HandleResponse(), and XrdCl::FutureWrapperBase< void >::~FutureWrapperBase().
bool XrdCl::FutureWrapperBase< Response >::called [protected] |
true if the handler has been called, false otherwise
Referenced by XrdCl::FutureWrapper< void >::HandleResponse(), XrdCl::FutureWrapper< Response >::HandleResponse(), and XrdCl::FutureWrapperBase< void >::~FutureWrapperBase().
std::promise<Response> XrdCl::FutureWrapperBase< Response >::prms [protected] |
promise that corresponds to the future
Referenced by XrdCl::FutureWrapperBase< void >::FutureWrapperBase(), XrdCl::FutureWrapper< void >::HandleResponse(), XrdCl::FutureWrapper< Response >::HandleResponse(), and XrdCl::FutureWrapperBase< void >::SetException().