5#ifndef MP_PROXY_TYPE_FUNCTION_H
6#define MP_PROXY_TYPE_FUNCTION_H
12template <
typename Result,
typename... Args>
15 using Fn = std::function<Result(Args...)>;
31 using Interface =
typename decltype(output.get())
::Calls;
34 std::make_shared<Callback>(std::forward<Value>(value)),
invoke_context.connection));
41template <
typename InvokeContext>
47 decltype(
auto)
operator()(
CallParams&&... params) {
return this->m_proxy->call(std::forward<CallParams>(params)...); }
58 using Interface =
typename Decay<
decltype(input.get())>
::Calls;
59 auto client = std::make_shared<ProxyClient<Interface>>(
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.
bool CustomHasField(TypeList< LocalTypes... >, InvokeContext &invoke_context, const Input &input)
Return whether to read a C++ value from a Cap'n Proto field.
std::decay_t< T > Decay
Type helper abbreviating std::decay.
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...
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.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.