Boost serialization: is there a way to perform selective read
Hey, I would like to know whether there is a way to preform selective read using Boost serialization, thus reading serialized instance with its id/key. The implementation that i know is saving instances to a file and then loading them all according to the saving order. Is there a way to read only one selected instance from the file. Thanks, -Ariella
ari vol wrote:
Hey,
I would like to know whether there is a way to preform selective read using Boost serialization http://www.boost.org/doc/libs/1_35_0/libs/serialization/doc/index.html, thus reading serialized instance with its id/key.
The implementation that i know is saving instances to a file and then loading them all according to the saving order. Is there a way to read only one selected instance from the file.
How about serializing objects separately? I mean instead of saving a object and its children objects into a big file, simply saving them into different files.
gchen wrote:
ari vol wrote:
Hey,
I would like to know whether there is a way to preform selective read using Boost serialization http://www.boost.org/doc/libs/1_35_0/libs/serialization/doc/index.html, thus reading serialized instance with its id/key.
The implementation that i know is saving instances to a file and then loading them all according to the saving order. Is there a way to read only one selected instance from the file.
You'd have to role your own to do this. It wouldn't be THAT hard if you derived fom xml_iarchive. But it wouldn't trivial either.
How about serializing objects separately? I mean instead of saving a object and its children objects into a big file, simply saving them into different files.
one file can contain concatonated archives. Robert Ramey
participants (3)
-
ari vol
-
gchen
-
Robert Ramey