5#ifndef MP_PROXY_TYPE_STRUCT_H
6#define MP_PROXY_TYPE_STRUCT_H
11template <
size_t index,
typename LocalType,
typename Value,
typename Output>
18 using Index = std::integral_constant<size_t, index>;
20 using Accessor =
typename std::tuple_element<index, typename ProxyStruct<Struct>::Accessors>::type;
27template <
size_t index,
typename LocalType,
typename Value,
typename Output>
36template <
typename LocalType,
typename Value,
typename Output>
47template <
size_t index,
typename LocalType,
typename Input,
typename Value>
54 using Index = std::integral_constant<size_t, index>;
56 using Accessor =
typename std::tuple_element<index, typename ProxyStruct<Struct>::Accessors>::type;
57 const auto&
struc = input.get();
64template <
size_t index,
typename LocalType,
typename Input,
typename Value>
73template <
typename LocalType,
typename Input,
typename ReadDest>
Functions to serialize / deserialize common bitcoin types.
std::decay_t< T > Decay
Type helper abbreviating std::decay.
void BuildField(TypeList< LocalTypes... >, Context &context, Output &&output, Values &&... values)
void BuildOne(TypeList< LocalType > param, InvokeContext &invoke_context, Output &&output, Value &&value, typename std::enable_if< index< ProxyType< LocalType >::fields >::type *enable=nullptr)
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...
std::remove_cv_t< std::remove_reference_t< T > > RemoveCvRef
Substitutue for std::remove_cvref_t.
decltype(auto) ReadField(TypeList< LocalTypes... >, InvokeContext &invoke_context, Input &&input, 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...
void ReadOne(TypeList< LocalType > param, InvokeContext &invoke_context, Input &&input, Value &&value, typename std::enable_if< index !=ProxyType< LocalType >::fields >::type *enable=nullptr)
Accessor type holding flags that determine how to access a message field.
Function parameter type for prioritizing overloaded function calls that would otherwise be ambiguous.
Mapping from local c++ type to capnp type and traits (specializations are generated by proxy-codegen....
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.