Bitcoin ABC 0.30.5
P2P Digital Currency
|
Formatter to serialize/deserialize vector elements using another formatter. More...
#include <serialize.h>
Public Member Functions | |
template<typename Stream , typename V > | |
void | Ser (Stream &s, const V &v) |
template<typename Stream , typename V > | |
void | Unser (Stream &s, V &v) |
Formatter to serialize/deserialize vector elements using another formatter.
Example: struct X { std::vector<uint64_t> v; SERIALIZE_METHODS(X, obj) { READWRITE(Using<VectorFormatter<VarInt>>(obj.v)); } }; will define a struct that contains a vector of uint64_t, which is serialized as a vector of VarInt-encoded integers.
V is not required to be an std::vector type. It works for any class that exposes a value_type, size, reserve, emplace_back, back, and const iterators.
Definition at line 718 of file serialize.h.
|
inline |
|
inline |