Boost logo

Boost Users :

From: Markus Svilans (msvilans_at_[hidden])
Date: 2008-04-23 09:36:41


One way to do that could be to use the Memento pattern, as described in
the book "Design Patterns" by Gamma et al.

That is, create a new object that encapsulates the state of the original
object. The state object would be the one serialized and de-serialized,
and passed into and out of the original objects to modify the state.

Regards,
Markus.

Robert Bielik wrote:
> 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
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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