G'day all.
Quoting Benjamin Lau
Yay! That's nice to note. I'm actually in the midst of designing an undo/redo framework and was thinking of submitting it to Boost once it is done. It's fairly simple in design and only needs 1 source file!
I'm also interested, but my needs are a bit more sophisticated. Imagine, for a moment, an application with a soft scripting layer. User interface components (e.g. menu items) can activate scripts written by the user. When the user tries to "undo", what they would expect is for all "primitive" operations to be undone. The same applies to "redo". I therefore think that any Boost.Undo would need to be able to handle this. And what I'd like to write is something along these lines: boost::undo::undo_manager s_undoManager; void activate_script() { boost::undo::transaction ut(s_undoManager); run_script(); } While the boost::undo::transaction object is alive, the undo_manager should treat all operations as a unit. Then when I call s_undoManager.undo() (or whatever it's called), it will undo all of the primitive operations done by the script in one go. Other desirable features: - The ability to name transactions/operations. - The ability to iterate through the undo/redo stacks and undo/redo up to an iterator. - The ability to create undo/redo "checkpoints" which only invalidate if the point truly no longer exists (e.g. if you undo past the checkpoint and subsequently "do" a new operation). Cheers, Andrew Bromage