Macros

Structs

  • | Formatter for integers in CompactSize | format. |
  • | 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. |
  • | If none of the specialized versions | above matched, default to calling member | function. |

  • | Support for SERIALIZE_METHODS and | READWRITE macro. |
  • | ::GetSerializeSize implementations | | Computing the serialized size of objects | is done through a special stream object | of type CSizeComputer, which only records | the number of bytes written to it. | | If your Serialize or SerializationOp | method has non-trivial overhead for | serialization, it may be worthwhile | to implement a specialized version | for | | CSizeComputer, which uses the s.seek() | method to record bytes that would be | written instead. |
  • | Serialization wrapper class for integers | in VarInt format. |
  • | Formatter to serialize/deserialize | vector elements using another formatter | | Example: | | ———– | @code | | struct X { | std::vector<uint64_t> v; | SERIALIZE_METHODS(X, obj) { READWRITE(Using<VectorFormatter>(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. |
  • | Simple wrapper class to serialize objects | using a formatter; used by Using(). |

Enums

  • | Mode for encoding VarInts. | | Currently there is no support for signed | encodings. The default mode will not | compile with signed values, and the | legacy “nonnegative signed” mode will | accept signed values, but improperly | encode and decode them if they are negative. | In the future, the DEFAULT mode could | be extended to support negative numbers | in a backwards compatible way, and additional | modes could be added to support different | varint formats (e.g. zigzag encoding). |

Constants

  • | The maximum size of a serialized object | in bytes or number of elements (for eg | vectors) when the size is encoded as | CompactSize. |
  • | Maximum amount of memory (in bytes) | to allocate at once when deserializing | vectors. |

Traits

Functions

Type Definitions