|
Boost Users : |
From: Scott Howlett (boost_at_[hidden])
Date: 2008-04-23 10:51:28
In article <480F1DB6.9060000_at_[hidden]>, robert.bielik_at_[hidden]
says...
> Is there a way to do a "re-serialization" of an object structure? Let's say I have a couple of objects, and I
> serialize them to "State A", then change a few things. Ideally, I'd like to just deserialize "State A" so that
> I get the objects back to that state, without boost::serialization creating new objects for me.
>
> Is it doable? (it is for an undo implementation)
>
> TIA
> /Rob
>
I don't have an answer, but I do have a problem that is (I think) quite
similar, which I was just planning to ask about today.
In my case, I have a big graph of objects that I serialize. After
serialization, that data is processed externally, and the results are
serialized in a similar way. While de-serializing this updated data, I
would like to merge it on the fly with my original data, just updating
object state as necessary and using my existing object pointers where
possible -- I want to avoid the memory and overhead of reading in the
entire new object graph and then traversing it to merge it into my
original objects.
For example, in my original data set I serialize object A, and then
object B with pointer-to-A. This data is processed, and I de-serialize
the results. When I read (possibly modified) object A, I would like to
update my existing object A with any changed state, and then (this is
the part I don't know how to do) have the input archive use the address
of my existing object A when it deserializes B.
So my question is also... is this doable? More specifically, is it
doable without modifying the existing library code?
Thanks,
Scott
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