First working implementation of ActionManager, but incomplete.

This commit is contained in:
brunoherbelin
2020-10-04 22:52:23 +02:00
parent 5421b5e926
commit 616c6c8bdf
12 changed files with 353 additions and 79 deletions

View File

@@ -2,6 +2,10 @@
#define ACTIONMANAGER_H
#include <atomic>
#include <tinyxml2.h>
class Action
{
// Private Constructor
@@ -18,14 +22,21 @@ public:
return _instance;
}
void clear();
void capture();
void store(const std::string &label, int id = -1);
void clear();
void undo();
void redo();
void stepTo(uint target);
private:
void restore(uint target, int id);
tinyxml2::XMLDocument xmlDoc_;
uint step_;
uint max_step_;
std::atomic<bool> locked_;
};
#endif // ACTIONMANAGER_H