5#ifndef MP_PROXY_TYPE_VECTOR_H
6#define MP_PROXY_TYPE_VECTOR_H
12template <
typename LocalType,
typename Value,
typename Output>
20 auto list = output.init(value.size());
22 for (
auto it = value.begin(); it != value.end(); ++it, ++i) {
32template <
typename LocalType,
typename Input,
typename ReadDest>
39 return read_dest.update([&](
auto& value) {
40 auto data = input.get();
42 value.reserve(
data.size());
43 for (
auto item :
data) {
46 value.emplace_back(std::forward<
decltype(
args)>(
args)...);
53template <
typename Input,
typename ReadDest>
60 return read_dest.update([&](
auto& value) {
61 auto data = input.get();
63 value.reserve(
data.size());
64 for (
auto item :
data) {
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...
LocalType BuildPrimitive(InvokeContext &invoke_context, const Value &value, TypeList< LocalType >, typename std::enable_if< std::is_enum< Value >::value >::type *enable=nullptr)
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.