IMPLEMENT_SERIAL Macro

Syntax

IMPLEMENT_SERIAL( className,baseClassName,schemaNumber )

Parameters

className

The name of the class that is to have the ability to serialize its members to persistent storage.

baseClassName

The name of the base class of the serializable class.

schemaNumber

The version number for objects of this class. If you modify a class, you can assign it a higher schema. Then, during serialization from storage to memory, if the schema number of the object on disk does not match that of the class in memory, an exception is thrown. This prevents you from reading an incorrect version of an object. The schema number is an integer greater than or equal to 0.

Remarks

Use in your .CPP file to correspond to the DECLARE_SERIAL macro in your .H file. This macro adds the necessary code to permit a class to serialize its members. You must also override the Serialize member function of class CObject.

See Also

DECLARE_SERIAL, CObject::Serialize, CObject