Boost logo

Boost :

From: Li Lirong (lirong_at_[hidden])
Date: 2004-01-03 03:32:28

I'm trying to use the serialization library to implement the undo/redo
functionality. Basically, the idea is like this:

Object* pObject;
redo_archive ar;

// create the object...

// before modify the object, save it first.
ar << pObject;

// modify the object...

// undo the modification from the archive
ar >> pObject;

The problem is that after the undo, pObject will point to a newly
created object instead of the originally. (The same applies some pointer
fields of the object.)

Any quick solution? (Maybe, when loading a pointer, the library will not
create a new object if the pointer is not equal to 0?)


Boost list run by bdawes at, gregod at, cpdaniel at, john at