FutureBase.hpp
Go to the documentation of this file.
33 FutureBase(uint32_t _transactionId, zeus::FutureData::ObserverFinish _callback=nullptr, uint32_t _clientId=0);
42 FutureBase(uint32_t _transactionId, ememory::SharedPtr<zeus::Buffer> _returnData, zeus::FutureData::ObserverFinish _callback=nullptr, uint32_t _clientId=0);
std::function< bool(zeus::FutureBase)> ObserverFinish
Define an Observer: function pointer.
Definition: FutureData.hpp:21
Generic zeus Future interface to get data asynchronously.
Definition: FutureBase.hpp:14
uint32_t getTransactionId() const
Get the transaction Id of the Future.
const FutureBase & waitFor(std::chrono::microseconds _delta=std::chrono::seconds(30)) const
Wait the Future receive data.
zeus::FutureBase operator=(const zeus::FutureBase &_base)
Asignement operator with an other future.
std::chrono::nanoseconds getTransmitionTime() const
Get duration of the current trasaction take.
bool appendData(ememory::SharedPtr< zeus::Buffer > _returnValue)
Add data on the call/answer.
const FutureBase & waitUntil(std::chrono::steady_clock::time_point _endTime) const
Wait the Future receive data.