Serializable
read and write data to disk
Serializable provides a base class for all the classes that need to be serialized using precache serialization mechanism.
Hierarchy
precache::util::Serializable
Macros
DECLARE_SERIALIZABLE
DECLARE_SERIALIZABLE(ClassName)
DECLARE_SERIALIZABLE should be invoked within any Serializable class definition in order to define the class members needed for serialization.
IMPLEMENT_SERIALIZABLE
IMPLEMENT_SERIALIZABLE(ClassNameSpace,ClassName)
SIMPLE_IMPLEMENT_SERIALIZABLE(ClassName)
These two implementation macros should be invoked within the class implementation file, which contains the class method implementation, in order to initialize the class members used for serialization.
Methods
GetName
virtual const PCSmallString GetName()
Returns the class name of the current object. GetName is implicitly defined by DECLARE_SERIALIZABLE macro.
Serialize
virtual void Serialize(Archive &arch) throw(precache::util::SerializationException)
Serializes an object to or from an archive. Serialize must be implicitly redefined by each serilizable class.
- arch
- Represents the serialization archive
|