5 #ifndef MP_PROXY_TYPE_FUNCTION_H 6 #define MP_PROXY_TYPE_FUNCTION_H 12 template <
typename Result,
typename... Args>
23 template <
typename Value,
typename FnR,
typename... FnParams,
typename Output>
31 using Interface =
typename decltype(output.get())::Calls;
34 std::make_shared<Callback>(std::forward<Value>(value)), invoke_context.
connection));
41 template <
typename InvokeContext>
46 template <
typename... CallParams>
47 decltype(
auto) operator()(CallParams&&... params) {
return this->m_proxy->call(std::forward<CallParams>(params)...); }
50 template <
typename FnR,
typename... FnParams,
typename Input,
typename ReadDest>
58 using Interface =
typename Decay<decltype(input.get())>::Calls;
59 auto client = std::make_shared<ProxyClient<Interface>>(
60 input.get(), &invoke_context.connection,
false);
61 return read_dest.construct(
ProxyCallFn<decltype(client)>{std::move(client)});
63 return read_dest.construct();
67 #endif // MP_PROXY_TYPE_FUNCTION_H
Function parameter type for prioritizing overloaded function calls that would otherwise be ambiguous...
Wrapper around std::function for passing std::function objects between client and servers...
std::function< Result(Args...)> Fn
bool CustomHasField(TypeList< LocalTypes... >, InvokeContext &invoke_context, const Input &input)
Return whether to read a C++ value from a Cap'n Proto field.
Generic utility functions used by capnp code.
Functions to serialize / deserialize common bitcoin types.
Mapping from capnp interface type to proxy server implementation (specializations are generated by pr...
Adapter to convert ProxyCallback object call to function object call.
Result call(Args &&... args) override
decltype(auto) CustomReadField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest) requires Unserializable< LocalType
Overload multiprocess library's CustomReadField hook to allow any object with an Unserialize method t...
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output) requires Serializable< LocalType
Overload multiprocess library's CustomBuildField hook to allow any serializable object to be stored i...
std::decay_t< T > Decay
Type helper abbreviating std::decay.