5#ifndef MP_PROXY_TYPE_POINTER_H
6#define MP_PROXY_TYPE_POINTER_H
11template <
typename LocalType,
typename Value,
typename Output>
19template <
typename LocalType,
typename Value,
typename Output>
31template <
typename LocalType,
typename Input,
typename ReadDest>
38 return read_dest.update([&](
auto& value) {
45template <
typename LocalType,
typename Input,
typename ReadDest>
52 return read_dest.update([&](
auto& value) {
60 value = std::make_shared<LocalType>(std::forward<
decltype(
args)>(
args)...);
67template <
typename LocalType,
typename Input,
typename ReadDest>
74 return read_dest.update([&](
auto& value) {
81 value = std::make_shared<LocalType>(std::forward<
decltype(
args)>(
args)...);
Functions to serialize / deserialize common bitcoin types.
void MaybeBuildField(std::true_type, Args &&... args)
bool CustomHasField(TypeList< LocalTypes... >, InvokeContext &invoke_context, const Input &input)
Return whether to read a C++ value from a Cap'n Proto field.
void MaybeReadField(std::true_type, Args &&... args)
std::decay_t< T > Decay
Type helper abbreviating std::decay.
void BuildField(TypeList< LocalTypes... >, Context &context, Output &&output, Values &&... values)
auto PassField(Priority< 1 >, TypeList< LocalType & >, ServerContext &server_context, Fn &&fn, Args &&... args) -> Require< typename decltype(Accessor::get(server_context.call_context.getParams()))::Calls >
PassField override for callable interface reference arguments.
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...
decltype(auto) ReadField(TypeList< LocalTypes... >, InvokeContext &invoke_context, Input &&input, Args &&... args)
ServerInvokeContext< ProxyServer< Interface >, ::capnp::CallContext< Params, Results > > ServerContext
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.
Destination parameter type that can be passed to ReadField function as an alternative to ReadDestEmpl...
Generic utility functions used by capnp code.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.