Boost logo

Boost :

From: Dave Harris (brangdon_at_[hidden])
Date: 2002-11-19 16:31:35


In-Reply-To: <01C28E6B.3B8768D0_at_[hidden]>
On Sun, 17 Nov 2002 18:57:52 -0800 Robert Ramey (ramey_at_[hidden]) wrote:
> I did briefly consider this, but it seemed it wasn't worth it. My
> real main objection was that it broke the symetry of the load/save
> system. I have found this symmetry is very helpful to permit
> verification that serialization is correctly used. Also, my "thought
> experiments" along these lines considered fundamental types
> where copying was really an efficiency issue. Finally it
> became clear that I couldn't figure out a way to handle
> the versioning problem. So there you are

OK... is the main problem access to the version number, or is there more
to it?

It seems to me that access to the version number could be got with syntax
like:

    MyClass( boost::basic_iarchive &ar ) {
        boost::version_type version = ar.version( this );
        //
    }

via an archive member template with a signature like:

    template <typename T>
    version_type basic_iarchive::version( const T *p ) const;

which seems to have enough information to look up typeid<T> in the
cobject_id_set.

-- Dave Harris


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