-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogelement.h
More file actions
35 lines (27 loc) · 722 Bytes
/
Copy pathlogelement.h
File metadata and controls
35 lines (27 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef LOGELEMENT_H
#define LOGELEMENT_H
#include <cstdint>
#include <utility>
#include <variant>
#include <bitset>
class ChangeValueLog;
class TakeNoteLog;
using LogElement = std::variant<ChangeValueLog, TakeNoteLog>;
namespace{
using coordinateType = std::pair<uint8_t, uint8_t>;
}
class ChangeValueLog{
public:
explicit ChangeValueLog(coordinateType, uint8_t, std::bitset<9>);
coordinateType m_coordinate;
uint8_t m_prevValue;
std::bitset<9> m_notesTakenBeforeAction;
};
class TakeNoteLog{
public:
explicit TakeNoteLog(coordinateType, uint8_t);
coordinateType m_coordinate;
uint8_t m_NoteValue;
};
class UndoProcessor;
#endif // LOGELEMENT_H