5#ifndef MP_PROXY_TYPE_MAP_H
6#define MP_PROXY_TYPE_MAP_H
13template <
typename KeyLocalType,
typename ValueLocalType,
typename Value,
typename Output>
21 auto list = output.init(value.size());
23 for (
const auto& elem : value) {
25 ListOutput<
typename decltype(list)::Builds>(list, i), elem);
30template <
typename KeyLocalType,
typename ValueLocalType,
typename Input,
typename ReadDest>
37 return read_dest.update([&](
auto& value) {
38 auto data = input.get();
40 for (
auto item :
data) {
41 ReadField(
TypeList<std::pair<const KeyLocalType, ValueLocalType>>(), invoke_context,
42 Make<ValueField>(item),
44 TypeList<std::pair<const KeyLocalType, ValueLocalType>>(), [&](
auto&&...
args) ->
auto& {
45 return *value.emplace(std::forward<
decltype(
args)>(
args)...).first;
Functions to serialize / deserialize common bitcoin types.
void BuildField(TypeList< LocalTypes... >, Context &context, Output &&output, Values &&... values)
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... >, Args &&... args)
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.
Generic utility functions used by capnp code.