Boost logo

Boost :

From: Ben Artin (macdev_at_[hidden])
Date: 2006-04-25 14:44:53


In article <20060423164438.M9591_at_[hidden]>,
 "Jeff Garland" <jeff_at_[hidden]> 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>

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk