CnC
|
You'll have to provide a serializer function for your class. One way of doing this is to derive your class from serializable and to provide a method "serialize":
In the implementation of this serialize method you should use the operator& of the serializer class. Here is an example:
This method will called for both packing and unpacking (what will actually be done, depends on the internal mode of the serializer.)
Alternatively, you can provide a global function
which should use the operator& of the serializer class (same as for method 2. above). This is useful in cases where you want to leave your class unchanged.