[#SERIALIZE_METHODS]
= SERIALIZE&lowbar;METHODS
:mrdocs:

Implement the Serialize and Unserialize methods by delegating to a single templated static method that takes the to&hyphen;be&hyphen;(de)serialized object as a parameter&period; This approach has the advantage that the constness of the object becomes a template parameter, and thus allows a single implementation that sees the object as const for serializing and non&hyphen;const for deserializing, without casts&period;

== Synopsis

Declared in `&lt;serialize&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
#define SERIALIZE&lowbar;METHODS(cls, obj)

----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cls*
| The class whose objects gain Serialize and Unserialize methods&period;
| *obj*
| The name bound to the object inside the generated method body&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
