source.ucregents.playground.serialization
Class Loader
java.lang.Object
source.ucregents.playground.serialization.Loader
public class Loader
- extends java.lang.Object
Designed to handle Saving and Loading in the game. Hopefully to be replaced with Castor (http://www.castor.org) as it handles the XML Parsing
behind the scenes and auto-magically.
Constructor Summary |
Loader(java.io.File loadFrom)
Constructor for serializing entities to an XML file. |
Method Summary |
java.util.Vector<BaseEntity> |
processDOM()
Going to be used to parse out the XML in the Load process. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Loader
public Loader(java.io.File loadFrom)
- Constructor for serializing entities to an XML file. Take a vector of entities and parse them into xml using their overridden toXMLElement()
method
- Parameters:
ents
- Entities to serializesaveTo
- XML File to save to
processDOM
public java.util.Vector<BaseEntity> processDOM()
throws java.lang.Exception
- Going to be used to parse out the XML in the Load process. Not implemented yet.
- Parameters:
urlString
- Path to XML to read from
- Throws:
java.lang.Exception
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object