|
Boost Users : |
From: Sergey Skorniakov (s.skorniakov_at_[hidden])
Date: 2004-12-07 04:42:01
Hello, Robert!
You wrote on Mon, 6 Dec 2004 10:25:07 -0800:
??>>
??>> Its look like that I need to reimplement the whole
??>> basic_iarchive_impl. Am
RR> I
??>> right?
??>>
RR> I don't think that would be necessary nor would it be desirable.
RR> The way I would go about is to make an "memento_iarchive" class as an
RR> "archive adaptor". This template would be used to alter the function
RR> of any other existing archive to convert it into a "memento" archive.
RR> See attached sample. This sample adapts any existing archive class to
RR> a "memento" equivalent by overriding the serialization of pointers to
RR> simple copy of the de-referenced data.
Thanks, Robert. This great! No one can say why I tried to override
load_pointer member. If I already know real object types, I can just create
special output archive and load objects with incompatible input archives,
without worring about tracking and object creation stuff. This works fine.
With best regards, Sergey.
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