5 #ifndef MP_PROXY_TYPE_POINTER_H 6 #define MP_PROXY_TYPE_POINTER_H 11 template <
typename LocalType,
typename Value,
typename Output>
19 template <
typename LocalType,
typename Value,
typename Output>
31 template <
typename LocalType,
typename Input,
typename ReadDest>
38 return read_dest.update([&](
auto& value) {
45 template <
typename LocalType,
typename Input,
typename ReadDest>
52 return read_dest.update([&](
auto& value) {
60 value = std::make_shared<LocalType>(std::forward<decltype(args)>(
args)...);
67 template <
typename LocalType,
typename Input,
typename ReadDest>
74 return read_dest.update([&](
auto& value) {
81 value = std::make_shared<LocalType>(std::forward<decltype(args)>(
args)...);
88 template <
typename Accessor,
typename LocalType,
typename ServerContext,
typename Fn,
typename... Args>
91 const auto& params = server_context.
call_context.getParams();
92 const auto& input = Make<StructField, Accessor>(params);
95 fn.invoke(server_context, std::forward<Args>(
args)...,
nullptr);
105 fn.invoke(server_context, std::forward<Args>(
args)..., ¶m);
107 auto&& results = server_context.
call_context.getResults();
109 Make<StructField, Accessor>(results), param);
113 #endif // MP_PROXY_TYPE_POINTER_H Function parameter type for prioritizing overloaded function calls that would otherwise be ambiguous...
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.
Destination parameter type that can be passed to ReadField function as an alternative to ReadDestEmpl...
Functions to serialize / deserialize common bitcoin types.
ServerInvokeContext< ProxyServer< Interface >, ::capnp::CallContext< Params, Results > > ServerContext
void BuildField(TypeList< LocalTypes... >, Context &context, Output &&output, Values &&... values)
void MaybeReadField(std::true_type, Args &&... args)
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.
decltype(auto) ReadField(TypeList< LocalTypes... >, InvokeContext &invoke_context, Input &&input, Args &&... args)
CallContext & call_context
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.
void MaybeBuildField(std::true_type, Args &&... args)