1 /* !!!! GENERATED FILE - DO NOT EDIT !!!!
2  * --------------------------------------
3  *
4  * This file is part of liblcf. Copyright (c) 2021 liblcf authors.
5  * https://github.com/EasyRPG/liblcf - https://easyrpg.org
6  *
7  * liblcf is Free/Libre Open Source Software, released under the MIT License.
8  * For the full copyright and license information, please view the COPYING
9  * file that was distributed with this source code.
10  */
11 
12 #ifndef LCF_RPG_SAVEEVENTEXECSTATE_H
13 #define LCF_RPG_SAVEEVENTEXECSTATE_H
14 
15 // Headers
16 #include <stdint.h>
17 #include <vector>
18 #include "lcf/rpg/saveeventexecframe.h"
19 #include "lcf/context.h"
20 #include <ostream>
21 #include <type_traits>
22 
23 /**
24  * rpg::SaveEventExecState class.
25  */
26 namespace lcf {
27 namespace rpg {
28 	class SaveEventExecState {
29 	public:
30 		std::vector<SaveEventExecFrame> stack;
31 		bool show_message = false;
32 		bool abort_on_escape = false;
33 		bool wait_movement = false;
34 		bool keyinput_wait = false;
35 		uint8_t keyinput_variable = 0;
36 		bool keyinput_all_directions = false;
37 		int32_t keyinput_decision = 0;
38 		int32_t keyinput_cancel = 0;
39 		int32_t keyinput_2kshift_2k3numbers = 0;
40 		int32_t keyinput_2kdown_2k3operators = 0;
41 		int32_t keyinput_2kleft_2k3shift = 0;
42 		int32_t keyinput_2kright = 0;
43 		int32_t keyinput_2kup = 0;
44 		int32_t wait_time = 0;
45 		int32_t keyinput_time_variable = 0;
46 		int32_t keyinput_2k3down = 0;
47 		int32_t keyinput_2k3left = 0;
48 		int32_t keyinput_2k3right = 0;
49 		int32_t keyinput_2k3up = 0;
50 		bool keyinput_timed = false;
51 		bool wait_key_enter = false;
52 	};
53 
54 	inline bool operator==(const SaveEventExecState& l, const SaveEventExecState& r) {
55 		return l.stack == r.stack
56 		&& l.show_message == r.show_message
57 		&& l.abort_on_escape == r.abort_on_escape
58 		&& l.wait_movement == r.wait_movement
59 		&& l.keyinput_wait == r.keyinput_wait
60 		&& l.keyinput_variable == r.keyinput_variable
61 		&& l.keyinput_all_directions == r.keyinput_all_directions
62 		&& l.keyinput_decision == r.keyinput_decision
63 		&& l.keyinput_cancel == r.keyinput_cancel
64 		&& l.keyinput_2kshift_2k3numbers == r.keyinput_2kshift_2k3numbers
65 		&& l.keyinput_2kdown_2k3operators == r.keyinput_2kdown_2k3operators
66 		&& l.keyinput_2kleft_2k3shift == r.keyinput_2kleft_2k3shift
67 		&& l.keyinput_2kright == r.keyinput_2kright
68 		&& l.keyinput_2kup == r.keyinput_2kup
69 		&& l.wait_time == r.wait_time
70 		&& l.keyinput_time_variable == r.keyinput_time_variable
71 		&& l.keyinput_2k3down == r.keyinput_2k3down
72 		&& l.keyinput_2k3left == r.keyinput_2k3left
73 		&& l.keyinput_2k3right == r.keyinput_2k3right
74 		&& l.keyinput_2k3up == r.keyinput_2k3up
75 		&& l.keyinput_timed == r.keyinput_timed
76 		&& l.wait_key_enter == r.wait_key_enter;
77 	}
78 
79 	inline bool operator!=(const SaveEventExecState& l, const SaveEventExecState& r) {
80 		return !(l == r);
81 	}
82 
83 	std::ostream& operator<<(std::ostream& os, const SaveEventExecState& obj);
84 
85 	template <typename F, typename ParentCtx = Context<void,void>>
86 	void ForEachString(SaveEventExecState& obj, const F& f, const ParentCtx* parent_ctx = nullptr) {
87 		for (int i = 0; i < static_cast<int>(obj.stack.size()); ++i) {
88 			const auto ctx1 = Context<SaveEventExecState, ParentCtx>{ "stack", i, &obj, parent_ctx };
89 			ForEachString(obj.stack[i], f, &ctx1);
90 		}
91 		(void)obj;
92 		(void)f;
93 		(void)parent_ctx;
94 	}
95 
96 } // namespace rpg
97 } // namespace lcf
98 
99 #endif
100