From: Robert Ramey (ramey_at_[hidden])
Date: 2004-01-05 00:40:34
Li Lirong wrote:
>> Another idea might be to create new type of archive called a
>> "memento archive" (name lifted from Design Patterns book)
>Will this "memento archive" be available in the lib?
I've thought about this a little bit and though its not trivial its seems
quite doable. Besides making the archive adaptor itself, It would
entail making another demo/test and update to the manual. It would
also entail consideration of non-obvious cases such as
collections which could be done more than one way. Also polymorphic
pointers would present some complications. So actually doing
this would end up taking more time than first meets the eye.
I'm hoping that the new version is close
to release so I can upload the next serialization version
(which only will work with boost 1.31) and would be reluctant
to hold that up. And finally, I'm reluctant to invest more effort
with its having been formally accepted into boost.
The more interesting point to me is whether or not its really a
necessary and/or good idea?
If you wan't to keep a copy of the current state of the object
you can copy the object to a stack. Of course you have to
keep track of pointers and decide whether or not they
should be deep copied, are NULL, etc.
My question is, you can do it without the the serialization library.
Is there some advantage to using the serialization libary that
isn't obvious to me or hasn't occured to me?
>Please also note that there is a special case where the pointer might be
>null so that the pointed object can not be simply serialized.
Note that the serialization library does properly save and load
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk