5#ifndef MP_PROXY_TYPE_FUNCTION_H
6#define MP_PROXY_TYPE_FUNCTION_H
12template <
typename Result,
typename... Args>
23template <
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));
41template <
typename InvokeContext>
46 template <
typename... CallParams>
47 decltype(
auto)
operator()(CallParams&&... params) {
return this->m_proxy->call(std::forward<CallParams>(params)...); }
50template <
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();
Wrapper around std::function for passing std::function objects between client and servers.
Adapter to convert ProxyCallback object call to function object call.
Result call(Args &&... args) override
std::function< Result(Args...)> Fn
Functions to serialize / deserialize common bitcoin types.
decltype(auto) CustomReadField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
Overload multiprocess library's CustomReadField hook to allow any object with an Unserialize method t...
std::decay_t< T > Decay
Type helper abbreviating std::decay.
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
Overload multiprocess library's CustomBuildField hook to allow any serializable object to be stored i...
Function parameter type for prioritizing overloaded function calls that would otherwise be ambiguous.
Mapping from capnp interface type to proxy server implementation (specializations are generated by pr...
Generic utility functions used by capnp code.