FutureData.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <zeus/Buffer.hpp>
10 #include <functional>
11 #include <ememory/memory.hpp>
12 
13 
14 namespace zeus {
15  class FutureBase;
19  class FutureData {
20  public:
21  using ObserverFinish = std::function<bool(zeus::FutureBase)>;
22  public:
23  uint32_t m_transactionId;
24  uint32_t m_clientId;
28  std::chrono::steady_clock::time_point m_sendTime;
29  std::chrono::steady_clock::time_point m_receiveTime;
30  };
31 }
32 
std::function< bool(zeus::FutureBase)> ObserverFinish
Define an Observer: function pointer.
Definition: FutureData.hpp:21
Data interface of the future (the future can be copied, but the data need to stay...
Definition: FutureData.hpp:19
ObserverFinish m_callbackFinish
ofserver of the finish data
Definition: FutureData.hpp:27
ememory::SharedPtr< zeus::Buffer > m_returnData
all buffer concatenate or last buffer if synchronous
Definition: FutureData.hpp:26
std::chrono::steady_clock::time_point m_sendTime
time when the future has been sended request
Definition: FutureData.hpp:28
uint32_t m_transactionId
waiting answer data
Definition: FutureData.hpp:23
Main zeus library namespace.
Definition: AbstractFunction.hpp:15
uint32_t m_clientId
need to anser at this client.
Definition: FutureData.hpp:24
bool m_isSynchronous
the future is synchronous. (call when receive data)
Definition: FutureData.hpp:25
std::chrono::steady_clock::time_point m_receiveTime
time when the future has receve answer
Definition: FutureData.hpp:29