yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
history_manager.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_SYSTEM_HISTORY_MANAGER_H
2#define YAZE_APP_EDITOR_SYSTEM_HISTORY_MANAGER_H
3
4#include <cstddef>
5#include <stack>
6#include <vector>
7
8namespace yaze {
9namespace app {
10namespace editor {
11
12// System history manager, undo and redo.
14 public:
15 HistoryManager() = default;
16 ~HistoryManager() = default;
17
18 void Add(const char* data);
19 void Undo();
20 void Redo();
21
22 private:
23 std::vector<const char*> history_;
24 std::stack<const char*> undo_;
25 std::stack<const char*> redo_;
26};
27
28} // namespace editor
29} // namespace app
30} // namespace yaze
31
32#endif // YAZE_APP_EDITOR_SYSTEM_HISTORY_MANAGER_H
std::stack< const char * > redo_
std::stack< const char * > undo_
std::vector< const char * > history_
void Add(const char *data)
Definition common.cc:22