Boost logo

Boost Users :

From: Leon Mergen (leon_at_[hidden])
Date: 2005-09-04 09:49:23


Hello,

I wondered how the Boost.Serialization library determines how many bytes
to read from an input stream to "fill" a class with data. That is, does
it read an entire input stream until the end of the stream and use that
as the data to fill a class with, or does it perform a sizeof(class) and
read that from the stream ?

If it is the latter, then out of curiosity, how does it determine the
size of an object with different class versions ( so if an object
version 1 has been saved and then tries to load version 2 ) ? Does it
write some sort of object size at the beginning of the file ?

If it reads the entire stream until the end, what would be a good
approach to save multiple objects in a single file, and be able to read
just a few objects out of the file ?

Thanks in advance for any responses.

Regards,

Leon Mergen


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net