![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Seg/UndoRecorder.h>
Serializes undo levels into (binary) files and restores the whole stack of undos from these files writeUndoFile() can be repeatedly called asynchronously, restoreUndoStack() should be called once. More...
Serializes undo levels into (binary) files and restores the whole stack of undos from these files writeUndoFile() can be repeatedly called asynchronously, restoreUndoStack() should be called once.
Public Member Functions | |
| UndoSerializer (const std::string &undoDir) | |
| std::vector< internal::UndoLevel > | restoreUndoStack (bool deleteUnrestoredFiles=true) |
| Restores the full undo stack reading from the directory passed in the constructor. | |
| void | writeUndoFileAsync (internal::UndoLevel uLevel) |
| Starts writing the given undo to a binary file in the background and return immediately. | |
| void | waitUntilWriterFinished () |
| Waits until all async writers are finished (see writeUndoFileAsync). | |
Protected Member Functions | |
| std::optional< internal::UndoLevel > | readIn (std::istream &is) |
Static Protected Member Functions | |
| static void | writeOut (std::ostream &os, const internal::UndoLevel &uLevel) |
| Methods to serialize and deserialize an UndoLevel to ostream/istream. | |
| void writeUndoFileAsync | ( | internal::UndoLevel | uLevel | ) |
Starts writing the given undo to a binary file in the background and return immediately.
Only one file is written at a time. When calling this function multiple times, the next file is only written once the previous files have been completely written.