summary refs log tree commit diff stats
path: root/tools/validator/structs.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/validator/structs.h')
-rw-r--r--tools/validator/structs.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/tools/validator/structs.h b/tools/validator/structs.h new file mode 100644 index 0000000..c3427f4 --- /dev/null +++ b/tools/validator/structs.h
@@ -0,0 +1,97 @@
1#ifndef TOOLS_VALIDATOR_STRUCTS_H_
2#define TOOLS_VALIDATOR_STRUCTS_H_
3
4#include <map>
5#include <string>
6#include <vector>
7
8#include "proto/human.pb.h"
9#include "util/identifiers.h"
10
11namespace com::fourisland::lingo2_archipelago {
12
13struct MalformedIdentifiers {
14 std::vector<PaintingIdentifier> paintings;
15 std::vector<PanelIdentifier> panels;
16 std::vector<KeyholderIdentifier> keyholders;
17
18 bool HasAny() const {
19 return !paintings.empty() || !panels.empty() || !keyholders.empty();
20 }
21};
22
23struct RoomInfo {
24 std::vector<HumanRoom> definitions;
25
26 std::vector<DoorIdentifier> doors_referenced_by;
27 std::vector<PanelIdentifier> panels_referenced_by;
28 std::vector<HumanConnection> connections_referenced_by;
29};
30
31struct DoorInfo {
32 std::vector<HumanDoor> definitions;
33
34 std::vector<HumanConnection> connections_referenced_by;
35 std::vector<DoorIdentifier> doors_referenced_by;
36 std::vector<PanelIdentifier> panels_referenced_by;
37 std::vector<PaintingIdentifier> paintings_referenced_by;
38 std::vector<PortIdentifier> ports_referenced_by;
39
40 MalformedIdentifiers malformed_identifiers;
41};
42
43struct PortInfo {
44 std::vector<HumanPort> definitions;
45
46 std::vector<HumanConnection> connections_referenced_by;
47};
48
49struct PaintingInfo {
50 std::vector<HumanPainting> definitions;
51
52 std::vector<HumanConnection> connections_referenced_by;
53 std::vector<DoorIdentifier> doors_referenced_by;
54};
55
56struct ProxyInfo {
57 std::vector<Proxy> definitions;
58
59 std::vector<HumanConnection> connections_referenced_by;
60 std::vector<DoorIdentifier> doors_referenced_by;
61};
62
63struct PanelInfo {
64 std::vector<HumanPanel> definitions;
65
66 std::vector<HumanConnection> connections_referenced_by;
67 std::vector<DoorIdentifier> doors_referenced_by;
68
69 std::map<std::string, ProxyInfo> proxies;
70};
71
72struct KeyholderInfo {
73 std::vector<HumanKeyholder> definitions;
74
75 std::vector<DoorIdentifier> doors_referenced_by;
76};
77
78using LetterIdentifier = std::tuple<char, bool>;
79
80struct LetterInfo {
81 std::vector<RoomIdentifier> defined_in;
82};
83
84struct CollectedInfo {
85 std::map<RoomIdentifier, RoomInfo, RoomIdentifierLess> rooms;
86 std::map<DoorIdentifier, DoorInfo, DoorIdentifierLess> doors;
87 std::map<PortIdentifier, PortInfo, PortIdentifierLess> ports;
88 std::map<PaintingIdentifier, PaintingInfo, PaintingIdentifierLess> paintings;
89 std::map<PanelIdentifier, PanelInfo, PanelIdentifierLess> panels;
90 std::map<KeyholderIdentifier, KeyholderInfo, KeyholderIdentifierLess>
91 keyholders;
92 std::map<LetterIdentifier, LetterInfo> letters;
93};
94
95} // namespace com::fourisland::lingo2_archipelago
96
97#endif /* TOOLS_VALIDATOR_STRUCTS_H_ */