
In article <20060423164438.M9591@crystalclearsoftware.com>, "Jeff Garland" <jeff@crystalclearsoftware.com> wrote:
On Sun, 23 Apr 2006 09:19:54 -0700, Robert Ramey wrote
Jeff Garland wrote:
I assure you that a serialization archive can be built that doesn't depend directly on order. Essentially the archive would read and parse the data into an intermediate structure (property tree might be good :-) and then responds to the deserialization requests using a mapped based lookup instead of getting the next data from the file.
I'm surprised that no one (that I know of) hasn't done this.
Me too...
I have done it for serialization to Mac OS X property lists (which are basically map<string, variant<vector, map, string, integer>>).
Not sure what you mean. Surely if I write MyFancyArchive class I can simply load the data and lookup on the fieldname during the load step, right? I agree this isn't how the current archives work, but I don't believe this design is precluded. Of course it requires nvp style in the object eg:
ar & make_nvp("field1", obj.field1);
This design is not precluded, that's exactly what I did in my Mac OS X property list implementation. Ben -- I changed my name: <http://periodic-kingdom.org/People/NameChange.php>