Use Case Description
A real estate office has an application for managing its properties. Internally, the application creates objects to represent the properties in the company’s current catalog of properties for sale, and places these objects in a vector collection. When the application is shut down, the vector is serialized out to a file. Because the files are in XML format, the properties represented by the serialized objects can be viewed in a Web browser by transforming the XML file into HTML. The XML file is read in when the application is restarted to restore the application to its state at shutdown.
The company categorizes its properties as either residential or rural land. In the application code, there is a real_property base class, with derived classes residential and rural_land. References to property objects are mainly through pointers to real_property, with polymorphism redirecting the reference to the concrete residential and rural_land objects. The serialization needs to preserve these pointer references.