Re: Re: [boost] Re: Using Serialization for binary marshalling

Jeff Garland wrote:
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. 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. Robert Ramey

On Mon, 19 Apr 2004 09:52:13 -0700, Robert Ramey wrote
Excellent -- that's a clear advantage of this design over the typical virtual function based approach.
I suspected that this was the case -- nice to know the details :-) Jeff
participants (2)
-
Jeff Garland
-
Robert Ramey