$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Jeff Garland (jeff_at_[hidden])
Date: 2004-04-19 12:34:40
On Mon, 19 Apr 2004 09:52:13 -0700, Robert Ramey wrote
> Jeff Garland wrote:
> 
> > I believe that Matthew has now demonstrated that archive extension is
> > possible, which I believe is one of the major changes from the first
> > review.   That said, any documentation of this process would clearly be a
> > plus.  In a typical proprietary archives writing of the version and type
> > numbers will need to be shut off.  So I can imagine documenting these
> > sorts of issues.
> 
> As it turns out, type id, and object id are really required only for
> pointers and version is in fact optional.  
> 
> It would be possible to make an archive which:
> 
> a) trapped (BOOST_STATIC_ASSERT) attempts to serialize a pointer
> b) trapped attempt to save/load object id and class id
> c) implemented null serialization of version numbers and trapped 
> attempts to use version number != 0
> 
> This would work only on serializations that had implementation 
> attributes of no versioning, and no object tracking.  If used on 
> other types, it would trap at compiler time.
Excellent -- that's a clear advantage of this design over the typical virtual
function based approach.
 
> I believe that you would have what you wanted.  In general, the part 
> of the library which saves/loads the preamble is invoked only for 
> pointers.  An easy way to check this is to generate XML archive and 
> find that there are not attributes for this types.
I suspected that this was the case -- nice to know the details :-)
Jeff