Note: the following is just speculation on my part - take with a grain of
salt.
"Sergey Skorniakov"
Hello, Robert! You wrote on Fri, 3 Dec 2004 08:25:02 -0800:
RR> Hmmm - I've considered that in the past in order to implement a RR> "memento archive" that could be used for do/undo functionality. This RR> wouldn't be too hard as it would be an derivation from any existing RR> archive which specializes the archive save/load member templates for RR> pointers.
Its look like that I need to reimplement the whole basic_iarchive_impl. Am I right?
I don't think that would be necessary nor would it be desirable.
The way I would go about is to make an "memento_iarchive" class as an
"archive adaptor". This template would be used to alter the function of any
other existing archive to convert it into a "memento" archive. See attached
sample. This sample adapts any existing archive class to a "memento"
equivalent by overriding the serialization of pointers to simple copy of the
de-referenced data.
The attached sample does compile on two compilers.
Good Luck
Robert Ramey
begin 666 memento_iarchive.hpp
M+R\@;65M96YT;R!A