Cause serialization/deserialization of an object to be done using a specified formatter class.
Declared in <serialize.h>
template<
typename Formatter,
typename T>
static
Wrapper<Formatter, T&>
Using(T&& t);
To use this, you need a class Formatter that has public functions Ser(stream, const object&) for serialization, and Unser(stream, object&) for deserialization. Serialization routines (inside READWRITE, or directly with << and >> operators), can then use Using<Formatter>(object).
This works by constructing a Wrapper<Formatter, T>-wrapped version of object, where T is const during serialization, and non-const during deserialization, which maintains const correctness.
A Wrapper that applies the formatter to t.
| Name | Description |
|---|---|
| t | The object to (de)serialize through the formatter. |