diff options
| author | Pieter Wuille <[email protected]> | 2020-05-19 14:30:30 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2020-05-19 14:30:30 -0700 |
| commit | f9ee0f37c28f604bc82dab502ce229c66ef5b3b9 (patch) | |
| tree | be73b9290c400e8b36e3441a71ba24448c5f537e /src | |
| parent | Convert everything except wallet/qt to new serialization (diff) | |
| download | discoin-f9ee0f37c28f604bc82dab502ce229c66ef5b3b9.tar.xz discoin-f9ee0f37c28f604bc82dab502ce229c66ef5b3b9.zip | |
Add comments to CustomUintFormatter
Diffstat (limited to 'src')
| -rw-r--r-- | src/serialize.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/serialize.h b/src/serialize.h index 82c332f92..af49fb701 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -520,6 +520,15 @@ struct VarIntFormatter } }; +/** Serialization wrapper class for custom integers and enums. + * + * It permits specifying the serialized size (1 to 8 bytes) and endianness. + * + * Use the big endian mode for values that are stored in memory in native + * byte order, but serialized in big endian notation. This is only intended + * to implement serializers that are compatible with existing formats, and + * its use is not recommended for new data structures. + */ template<int Bytes, bool BigEndian = false> struct CustomUintFormatter { |