WebCFace 2.5.2
Web-based Communication Framework & Dashboard-like UI
|
PromiseとCallHandleのデータを保持するクラス More...
#include <webcface/internal/func_internal.h>
Public Member Functions | |
void | callReachEvent () |
void | callFinishEvent () |
PromiseData (const Field &base, std::vector< ValAdaptor > &&args, std::size_t caller_id=0) | |
template<std::size_t v_index, typename CVal > | |
std::vector< CVal > & | initCArgs () |
Promise | getter () |
CallHandle | setter () |
std::size_t | callerId () const |
Public Attributes | |
std::mutex | m |
std::condition_variable | cond |
std::function< void(Promise)> | reach_event |
std::function< void(Promise)> | finish_event |
bool | reach_event_done = false |
bool | finish_event_done = false |
bool | reached = false |
bool | found = false |
bool | finished = false |
bool | is_error = false |
ValAdaptor | response |
ValAdaptor | rejection |
std::promise< bool > | started_p |
std::promise< ValAdaptor > | result_p |
std::shared_future< bool > | started_f |
std::shared_future< ValAdaptor > | result_f |
Field | base |
std::size_t | caller_id |
const std::vector< ValAdaptor > | args_ |
std::variant< int, std::vector< wcfMultiVal >, std::vector< wcfMultiValW > > | c_args_ |
PromiseとCallHandleのデータを保持するクラス
|
inlineexplicit |
startedとresultを空の状態で初期化
|
inline |
void callFinishEvent | ( | ) |
resultとresultEventが両方セットされていればコールバック発動
void callReachEvent | ( | ) |
startedとstartedEventが両方セットされていればコールバック発動
Promise getter | ( | ) |
std::vector< CVal > & initCArgs |
c_args_ をwcfMultiValの配列またはwcfMultiValWの配列で初期化
CallHandle setter | ( | ) |
const std::vector<ValAdaptor> args_ |
Field base |
std::variant<int, std::vector<wcfMultiVal>, std::vector<wcfMultiValW> > c_args_ |
std::size_t caller_id |
std::condition_variable cond |
std::function<void(Promise)> finish_event |
bool finish_event_done = false |
bool finished = false |
bool found = false |
bool is_error = false |
std::mutex m |
PromiseDataのメソッドはmutexをロックしないので、呼び出し側がロックすること また、eventの中ではunlockされる
std::function<void(Promise)> reach_event |
bool reach_event_done = false |
bool reached = false |
ValAdaptor rejection |
ValAdaptor response |
std::shared_future<ValAdaptor> result_f |
std::promise<ValAdaptor> result_p |
std::shared_future<bool> started_f |
std::promise<bool> started_p |