Data persistance and management.
Data can be stored in any number of formats that we san serialize to. Serializarion is basically a smart data stream. On store, data is fed into the stream with tags that identify identifiers the data when it is later loaded. On load, the data is drawn out and fed back to the object manager which upon reading tags calls the proper create methods or factories to rebuild the objects from the data. Each object is responsible for what to do with that data. Objects must also validate the data and throw the proper exception for the problem that occurs. The data manager must capture and handle it's own exceptions includind the SerializeException.
When you look at the source for the XML class, you will discover that it's quite small and not complex. A few methods are using delegates to allow the save and load methods a clean way to call back functions to build the tree. This serialization system allows the use of multiple storage system and almost never touch the main code.
Copyright ©2010 Alabama Cajun for Theme Park Builder 3D Licensed under Creative Commons!