From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-03-01 09:33:08
Has anyone considered describe /types/ instead of describe methods?
One very clever system I've seen used globally-declared structure instances
to do this job. I don't remember the details at all, so this could be
struct my_record : description<my_record>
char const name = "my_record";
----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
Sent: Friday, March 01, 2002 7:54 AM
Subject: Re: [boost] Re: Serialization (Persistence) library draft
> From: "Vladimir Prus" <ghost_at_[hidden]>
> > I don't think there's consensus on describe vs. load/save question.
> > recorded this, I suggest that we postpone this question until other
> > are resolved.
> A single describe() method doesn't work for the following reasons:
> 1. const correctness.
> 2. read/write assymetry.
> 2a. sequence serialization:
> template<class R, class T, class A> void read(R & r, std::vector<T, A> &
> int m = begin_sequence(r);
> if(m > 0) read_sequence(r, &v, m, 0);
> template<class W, class T, class A> void write(W & w, std::vector<T, A>
> const & v, int)
> int m = v.size();
> begin_sequence(w, m);
> if(m > 0) write_sequence(w, &v, m, 0);
> end_sequence(w, m);
> 2b. versioning. When Complex version 1 is serialized as polar coordinates
> but version 2 is cartesian, read/write are assymetric.
> There probably is a solution to these problems but I haven't found it yet
> ('cause I didn't look that hard.)
> Info: http://www.boost.org Send unsubscribe requests to:
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk