Hmmm - I've considered that in the past in order to implement a "memento
archive" that could be used for do/undo functionality. This wouldn't be too
hard as it would be an derivation from any existing archive which
specializes the archive save/load member templates for pointers. In
considering this, a couple of quesions come to mind like:
a) for collections, what if members are added/deleted between the save and
load.
b) This would basically replace the deep class assignment capability which
is often already built-in. Its not clear that using the serialization is any
better.
Robert Ramey
"Sergey Skorniakov"
Hello, All!
Are there any way to load existing objects by base class pointer without creating new? Examination of input archives source code does not give me any idea how I can achieve it. I think I need some mechanism for runtime switching archive object tracking behaviour in that way so all objects will interpreted as already created (or per-object tracking registration without actual object loading to pre-register pointer to object as already created before object loading).
With best regards, Sergey.