| Package | com.pblabs.engine.serialization |
| Class | public class Enumerable |
| Inheritance | Enumerable Object |
| Implements | ISerializable |
| Subclasses | AnimatorType, InputKey, SceneAlignment |
Serialization is also provided by this class so the names of the constants can be used in XML rather than their values.
| Property | Defined By | ||
|---|---|---|---|
| defaultType : Enumerable [read-only]
This must be implemented by subclasses. | Enumerable | ||
| typeMap : Dictionary [read-only]
This must be implemented by subclasses. | Enumerable | ||
| Method | Defined By | ||
|---|---|---|---|
deserialize(xml:XML):*
deserializes the object from xml. | Enumerable | ||
serialize(xml:XML):void
serializes the object to XML. | Enumerable | ||
| defaultType | property |
defaultType:Enumerable [read-only] This must be implemented by subclasses. It is the type to use when a string isn't found in the TypeMap.
public function get defaultType():Enumerable| typeMap | property |
typeMap:Dictionary [read-only] This must be implemented by subclasses. It is a dictionary that maps the names of enumerable values to the instance of the enumerable they represent.
public function get typeMap():Dictionary| 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.
|
* — 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.
|
| serialize | () | method |
public function serialize(xml:XML):voidserializes 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.
|