a smart AsyncCall pointer for delivery of future results More...
#include <AsyncCallbacks.h>
Public Member Functions | |
AsyncCallback ()=default | |
template<class Call > | |
AsyncCallback (const RefCount< Call > &call) | |
Answer & | answer () |
AsyncCall::Pointer | release () |
operator bool () const | |
whether the callback has been set but not released More... | |
operator const AsyncCall::Pointer & () const | |
const AsyncCall & | operator* () const |
const AsyncCall * | operator-> () const |
Private Attributes | |
AsyncCall::Pointer | call_ |
callback carrying the answer More... | |
Answer * | answer_ = nullptr |
Detailed Description
class AsyncCallback< Answer >
Definition at line 31 of file AsyncCallbacks.h.
Constructor & Destructor Documentation
◆ AsyncCallback() [1/2]
|
default |
◆ AsyncCallback() [2/2]
|
inlineexplicit |
Definition at line 38 of file AsyncCallbacks.h.
Member Function Documentation
◆ answer()
|
inline |
Definition at line 44 of file AsyncCallbacks.h.
References AsyncCallback< Answer >::answer_, and assert.
Referenced by Ipc::StartListening().
◆ operator bool()
|
inlineexplicit |
Definition at line 61 of file AsyncCallbacks.h.
References AsyncCallback< Answer >::answer_.
◆ operator const AsyncCall::Pointer &()
|
inline |
Definition at line 64 of file AsyncCallbacks.h.
References AsyncCallback< Answer >::call_.
◆ operator*()
|
inline |
Definition at line 65 of file AsyncCallbacks.h.
References AsyncCallback< Answer >::call_.
◆ operator->()
|
inline |
Definition at line 66 of file AsyncCallbacks.h.
References AsyncCallback< Answer >::call_.
◆ release()
|
inline |
make this smart pointer nil
- Returns
- the AsyncCall pointer we used to manage before this call
Definition at line 52 of file AsyncCallbacks.h.
References AsyncCallback< Answer >::answer_, and AsyncCallback< Answer >::call_.
Referenced by Ipc::StartListening().
Member Data Documentation
◆ answer_
|
private |
(future) answer inside this->call, obtained when it was still possible to reach it without dynamic casts and virtual methods
Definition at line 74 of file AsyncCallbacks.h.
Referenced by AsyncCallback< Answer >::answer(), AsyncCallback< Answer >::operator bool(), and AsyncCallback< Answer >::release().
◆ call_
|
private |
Definition at line 70 of file AsyncCallbacks.h.
Referenced by AsyncCallback< Answer >::operator const AsyncCall::Pointer &(), AsyncCallback< Answer >::operator*(), AsyncCallback< Answer >::operator->(), and AsyncCallback< Answer >::release().
The documentation for this class was generated from the following file:
- src/base/AsyncCallbacks.h