PackagePBLabs.Engine.Serialization
Interfacepublic interface ISerializable
ImplementorsEnumerable, InputMap, LevelManager, ObjectType, PropertyReference

Provides an interface for objects to override the default serialization behavior.

Any class implementing this interface will automatically have its Serialize and Deserialize methods called in place of the default serialization methods on the Serializer class.

See also

Serializer
Custom Serialization


Public Methods
 MethodDefined by
  
Deserialize(xml:XML):*
Deserializes the object from xml.
ISerializable
  
Serialize(xml:XML):void
Serializes the object to XML.
ISerializable
Method detail
Deserialize()method
public function Deserialize(xml:XML):*

Deserializes the object from xml. The format of the xml passed is custom, depending on the way the object was serialized with the Serialize method.

Parameters
xml:XML — The xml containing the serialized definition of the class.

Returns
* — The deserialized object. Usually 'this' should be returned, but in some cases it may be useful to return something else. The Enumerable class does this to force all values to be a member of the enumeration.

See also

Serialize()method 
public function Serialize(xml:XML):void

Serializes the object to XML. This should not include the main tag defining the class itself.

Parameters
xml:XML — The xml object to which the serialization of this class should be added. This xml object is a single tag containing the main class definition, so only children of this class should be added to it.

See also