mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-10 06:50:33 +08:00
Compare commits
558 Commits
docs/troub
...
rft/battle
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d434fb84c | ||
|
|
8681039067 | ||
|
|
dd36585b16 | ||
|
|
b58917c74b | ||
|
|
633fe73993 | ||
|
|
aa46d668d1 | ||
|
|
f76db36364 | ||
|
|
7f4a95280c | ||
|
|
711041f190 | ||
|
|
21086dcf68 | ||
|
|
2c3b6ac50a | ||
|
|
743c51a4b5 | ||
|
|
61ce039b12 | ||
|
|
f6788e6029 | ||
|
|
a7ed964cb0 | ||
|
|
a91fc84942 | ||
|
|
66ef1f0836 | ||
|
|
f0a3bbf16a | ||
|
|
529fedd95e | ||
|
|
434932d39a | ||
|
|
6601c6621c | ||
|
|
7a65be5fa5 | ||
|
|
0ca0de9663 | ||
|
|
c69ce8ca7a | ||
|
|
9bccb24654 | ||
|
|
0d4ffca813 | ||
|
|
b13e4d022b | ||
|
|
110847e005 | ||
|
|
772424e920 | ||
|
|
57888f783e | ||
|
|
f4ee5356d1 | ||
|
|
035fdaa6ca | ||
|
|
2d4c556bc6 | ||
|
|
58a3157bb3 | ||
|
|
848ebeb747 | ||
|
|
989ba7ee52 | ||
|
|
53e3ec8273 | ||
|
|
dbc1f1f6da | ||
|
|
0d57e73bb4 | ||
|
|
cf4553fa0a | ||
|
|
0af71a9f32 | ||
|
|
6ab3b6cc56 | ||
|
|
ec1de48e42 | ||
|
|
87e43d91f0 | ||
|
|
6104d0602b | ||
|
|
f04b9a6409 | ||
|
|
4fbb831c44 | ||
|
|
9301ea44b1 | ||
|
|
7e7beabb35 | ||
|
|
eb5803fef7 | ||
|
|
24f2cb5cbf | ||
|
|
fb8f3b78ad | ||
|
|
abcaf2ee06 | ||
|
|
03188824f7 | ||
|
|
340e2798a0 | ||
|
|
f9d468f557 | ||
|
|
e71eb3985d | ||
|
|
5adb76e377 | ||
|
|
be0ff90b8a | ||
|
|
cd723f2210 | ||
|
|
93ab1cc811 | ||
|
|
92421d464c | ||
|
|
260ab6e839 | ||
|
|
7e3e43e81a | ||
|
|
3b3056a65f | ||
|
|
5aa1d74b96 | ||
|
|
b9f196c3a1 | ||
|
|
c7a8191e03 | ||
|
|
3a87307bda | ||
|
|
f0ff035546 | ||
|
|
81504417c7 | ||
|
|
771c3e53b7 | ||
|
|
5cc7861d5c | ||
|
|
61f25c94e5 | ||
|
|
8da46bf991 | ||
|
|
26f421418e | ||
|
|
82dbe28b5e | ||
|
|
cc7c740921 | ||
|
|
4396c71802 | ||
|
|
351529d4cf | ||
|
|
eeeca5aa0f | ||
|
|
37c712637c | ||
|
|
3c995514a6 | ||
|
|
5038576b75 | ||
|
|
43952444bb | ||
|
|
1848caf82a | ||
|
|
baff16c024 | ||
|
|
894d540649 | ||
|
|
aef60f179c | ||
|
|
25903aba2d | ||
|
|
42f57797d7 | ||
|
|
30ade6e2a6 | ||
|
|
017147f3f6 | ||
|
|
4c5afa12c7 | ||
|
|
2fa5c743cc | ||
|
|
1702372f0f | ||
|
|
3dc32c1368 | ||
|
|
d6415c301b | ||
|
|
9bd75e6692 | ||
|
|
9dc8c05a73 | ||
|
|
00d1f93472 | ||
|
|
639c6d711b | ||
|
|
bd6176b25f | ||
|
|
e60a065ba4 | ||
|
|
41c9643b38 | ||
|
|
1e9d9ba5a0 | ||
|
|
678f0bd60e | ||
|
|
9bffc02d7f | ||
|
|
9c020dd5f9 | ||
|
|
e159598dc8 | ||
|
|
022b39c25a | ||
|
|
e94e3888bb | ||
|
|
ed2c55e81c | ||
|
|
b861c544a6 | ||
|
|
c72d99a030 | ||
|
|
4a836290b9 | ||
|
|
34a5bfdd3d | ||
|
|
1a072e302e | ||
|
|
e2e496122a | ||
|
|
6ac61f2274 | ||
|
|
a68ee788e1 | ||
|
|
7022a6d298 | ||
|
|
5cda61f8a6 | ||
|
|
b37afbaec1 | ||
|
|
be075ab749 | ||
|
|
6461d6a7e2 | ||
|
|
68130ede6d | ||
|
|
2f7d4a6c91 | ||
|
|
8a6982a144 | ||
|
|
5a2e2f2d6a | ||
|
|
754b4135cc | ||
|
|
966ded3836 | ||
|
|
b9e69dde73 | ||
|
|
f184093732 | ||
|
|
ef844da918 | ||
|
|
a3ac79d999 | ||
|
|
29b25079b8 | ||
|
|
7059375a2f | ||
|
|
062397669f | ||
|
|
c7d1718d97 | ||
|
|
9d875538bf | ||
|
|
6a05dfa694 | ||
|
|
109d20d3fd | ||
|
|
e579d2c683 | ||
|
|
c3a7ae0c22 | ||
|
|
558746add6 | ||
|
|
d51895af57 | ||
|
|
512ffa55bb | ||
|
|
56f2b35ea7 | ||
|
|
3086cee0cc | ||
|
|
66577b193c | ||
|
|
35f28a7c29 | ||
|
|
245279711d | ||
|
|
979f6699cc | ||
|
|
7359653317 | ||
|
|
f311f8525e | ||
|
|
4debf210bd | ||
|
|
1eeae5326f | ||
|
|
ce3624cfbb | ||
|
|
632447e8d3 | ||
|
|
a5917adc1c | ||
|
|
c86ea9fa12 | ||
|
|
539e2b48b2 | ||
|
|
58c2c6eccd | ||
|
|
8eb49dc463 | ||
|
|
cd44b22b8c | ||
|
|
1f7b675d04 | ||
|
|
e89e3d3f35 | ||
|
|
a47b1d427b | ||
|
|
774cc6d6fe | ||
|
|
c740e71900 | ||
|
|
a73eb5d52d | ||
|
|
7dfae900f1 | ||
|
|
edb5e0f7fc | ||
|
|
e9f0353d01 | ||
|
|
bc734f288b | ||
|
|
89f4d927a4 | ||
|
|
54c434c547 | ||
|
|
bb0d148fae | ||
|
|
cd42686824 | ||
|
|
7c9b12113f | ||
|
|
22f88ef718 | ||
|
|
722302bc28 | ||
|
|
188e55450a | ||
|
|
df2edc4bd4 | ||
|
|
c9672599a0 | ||
|
|
6c80f26542 | ||
|
|
7cd6873085 | ||
|
|
254db83bf6 | ||
|
|
6b6bed6c4d | ||
|
|
c11543f5a4 | ||
|
|
31cc95fb7f | ||
|
|
457ffe67de | ||
|
|
d53509ff06 | ||
|
|
6d8a4c7a5b | ||
|
|
e2c19995c2 | ||
|
|
3f10c972cd | ||
|
|
d3730cc0da | ||
|
|
b5b357938e | ||
|
|
805b76f113 | ||
|
|
4c5ae67063 | ||
|
|
8a97330be3 | ||
|
|
623e542f45 | ||
|
|
7350401ddd | ||
|
|
c4db21dd2b | ||
|
|
d713ca59e3 | ||
|
|
b3203ad848 | ||
|
|
89a42be269 | ||
|
|
218e9ec31a | ||
|
|
ba26b64b22 | ||
|
|
33b54e81b0 | ||
|
|
cb64ca4b13 | ||
|
|
e6549f0bf6 | ||
|
|
5466678785 | ||
|
|
8f279dc1b4 | ||
|
|
60c83e78e1 | ||
|
|
e63de8df32 | ||
|
|
053e11c9ba | ||
|
|
fbf48ebefd | ||
|
|
7ef4343f16 | ||
|
|
3e75ec507f | ||
|
|
94a0a4d916 | ||
|
|
ca605edffd | ||
|
|
7177e48d5c | ||
|
|
14c809a9ac | ||
|
|
ad4f4a93c0 | ||
|
|
5add3a5d8a | ||
|
|
f3f8264b53 | ||
|
|
3e30750da7 | ||
|
|
715c2c13b5 | ||
|
|
8d02395657 | ||
|
|
824d3bfebe | ||
|
|
88a0b97224 | ||
|
|
d6f73bc753 | ||
|
|
d1c09cc01a | ||
|
|
d65cde7574 | ||
|
|
afaeb011cf | ||
|
|
fa42a0880e | ||
|
|
2a32052ab0 | ||
|
|
1dba23a93e | ||
|
|
9592b1fd40 | ||
|
|
6deea622bd | ||
|
|
503d653330 | ||
|
|
fe5744f328 | ||
|
|
abcc3ba100 | ||
|
|
0b058bb0d9 | ||
|
|
c62d2ac4f8 | ||
|
|
9a81315b7f | ||
|
|
42f9b80be3 | ||
|
|
57cde24e99 | ||
|
|
f775b2a551 | ||
|
|
756f352c02 | ||
|
|
f574b14ed4 | ||
|
|
ef99f63311 | ||
|
|
62b72b0faa | ||
|
|
c988b7463d | ||
|
|
ee281863ff | ||
|
|
08f78a3151 | ||
|
|
af34bb6a6f | ||
|
|
0e5ed3be50 | ||
|
|
6f3bc269d6 | ||
|
|
68d7ac593b | ||
|
|
ab664d74fb | ||
|
|
aba41f09c0 | ||
|
|
2dc6745fdb | ||
|
|
5820fb202d | ||
|
|
cba20d7835 | ||
|
|
81f8ad902d | ||
|
|
426d76ee50 | ||
|
|
dd82fa0075 | ||
|
|
91b53a4b73 | ||
|
|
12fc5bbde3 | ||
|
|
6cfab2c1f0 | ||
|
|
730b9b2ad9 | ||
|
|
ddbf647524 | ||
|
|
6e9ef3c66e | ||
|
|
1ad6f70b55 | ||
|
|
9e990c337a | ||
|
|
8733055e83 | ||
|
|
e8885dc095 | ||
|
|
0d140c1b46 | ||
|
|
1f29f9dc16 | ||
|
|
505ba76fea | ||
|
|
e76e95c0a4 | ||
|
|
aff4ef43fa | ||
|
|
e4aa506cb4 | ||
|
|
7c5fe215ac | ||
|
|
ced3843c4b | ||
|
|
5f30226d99 | ||
|
|
2e30ef6169 | ||
|
|
3b0093c13c | ||
|
|
3416a47b26 | ||
|
|
d646af45ca | ||
|
|
c69fd51bc9 | ||
|
|
4fb83a9bca | ||
|
|
abf69a9c63 | ||
|
|
436643db9c | ||
|
|
1311a40126 | ||
|
|
dc49df6c0d | ||
|
|
209902466a | ||
|
|
6f0426b285 | ||
|
|
317a0d5224 | ||
|
|
193525cacb | ||
|
|
e32b526e81 | ||
|
|
96751335d3 | ||
|
|
2e6df0af8e | ||
|
|
43d13f5aaf | ||
|
|
6c405da322 | ||
|
|
dce6e317c8 | ||
|
|
fdc76bc5b5 | ||
|
|
2f8840feac | ||
|
|
f98a595620 | ||
|
|
2a7729074a | ||
|
|
40e607c98f | ||
|
|
351395f5b9 | ||
|
|
3e38b59f0c | ||
|
|
079932e34c | ||
|
|
9666b4a42b | ||
|
|
8779c867bf | ||
|
|
d10c90bc79 | ||
|
|
ac83069b99 | ||
|
|
8077d73a9b | ||
|
|
e5357e7dd7 | ||
|
|
f87be175e1 | ||
|
|
316dd9a005 | ||
|
|
6f07b16388 | ||
|
|
b59b42345a | ||
|
|
f80ec0b232 | ||
|
|
0cab88a1fb | ||
|
|
f5b8fe18e1 | ||
|
|
8fb76030b2 | ||
|
|
0234f2d274 | ||
|
|
018955d010 | ||
|
|
ed361efcd3 | ||
|
|
08665869ea | ||
|
|
2b0ad53830 | ||
|
|
f5010a3681 | ||
|
|
072592c49a | ||
|
|
45e55c0eaf | ||
|
|
d32ed24879 | ||
|
|
8c83b5e2d2 | ||
|
|
8a33102408 | ||
|
|
432a51a238 | ||
|
|
39dce2a0e1 | ||
|
|
c58e0a0e92 | ||
|
|
5e30ffc714 | ||
|
|
68a5ef3f85 | ||
|
|
d1bb221096 | ||
|
|
0743e1773b | ||
|
|
fafd1970be | ||
|
|
446ec8b8f6 | ||
|
|
07e561fae8 | ||
|
|
d42a8ba42e | ||
|
|
86a861f1c1 | ||
|
|
73801e5eae | ||
|
|
085444f25f | ||
|
|
81f6540170 | ||
|
|
66d49a7e81 | ||
|
|
9982545c99 | ||
|
|
eaf3b93c8e | ||
|
|
e29d506cf2 | ||
|
|
e4e9c8264c | ||
|
|
7204d0f62a | ||
|
|
60308846f3 | ||
|
|
e8717c0936 | ||
|
|
786518917c | ||
|
|
91195d3c02 | ||
|
|
09608430a9 | ||
|
|
f09e4de87e | ||
|
|
d306941c4f | ||
|
|
288fa379d3 | ||
|
|
66c9e3c65c | ||
|
|
f2586ec7fe | ||
|
|
63a30d96f6 | ||
|
|
99db411ea6 | ||
|
|
b330cb465b | ||
|
|
3c76830ad5 | ||
|
|
2b87578d53 | ||
|
|
a4420961ce | ||
|
|
4d76fabd77 | ||
|
|
457023106c | ||
|
|
e1b000631a | ||
|
|
04531f33c7 | ||
|
|
d3d8e1a5cf | ||
|
|
deb5fa3044 | ||
|
|
18a4a3fc31 | ||
|
|
3f5a7322e5 | ||
|
|
fc4437183d | ||
|
|
1d8068daf0 | ||
|
|
b0d14b4820 | ||
|
|
26caabb8d0 | ||
|
|
9443c835fa | ||
|
|
b981160487 | ||
|
|
9ed30c5658 | ||
|
|
cc7891c11d | ||
|
|
21f9864140 | ||
|
|
de2c50ec7e | ||
|
|
c447ee3568 | ||
|
|
5727be3b3a | ||
|
|
debcf92010 | ||
|
|
0839de2c94 | ||
|
|
c9374383c1 | ||
|
|
1c321bb313 | ||
|
|
4d975a1633 | ||
|
|
6137cc701b | ||
|
|
e15b95c084 | ||
|
|
660bb141aa | ||
|
|
d3981265bb | ||
|
|
d801be3fc1 | ||
|
|
8abff51da2 | ||
|
|
28ad1f2816 | ||
|
|
6bbc15040a | ||
|
|
86cbff2cab | ||
|
|
c3dc7d3711 | ||
|
|
4e3b10ded7 | ||
|
|
1a8e1bc989 | ||
|
|
814d9a651f | ||
|
|
5c9a01be2a | ||
|
|
13fa90a214 | ||
|
|
ae9a1f1cf0 | ||
|
|
21bc191a96 | ||
|
|
aa754996f0 | ||
|
|
631466cfff | ||
|
|
3d64624ad4 | ||
|
|
76a007501a | ||
|
|
cfad7fc743 | ||
|
|
e99dcb3e10 | ||
|
|
0b16a4fb26 | ||
|
|
8586c21312 | ||
|
|
80aa7c3bee | ||
|
|
3cb0a8ac08 | ||
|
|
40a614df0d | ||
|
|
30276f9c2d | ||
|
|
6c62cc373b | ||
|
|
31bf864f78 | ||
|
|
6196676eb3 | ||
|
|
856e2a140f | ||
|
|
d32f0c202f | ||
|
|
cf496728a3 | ||
|
|
2f9c187916 | ||
|
|
a265d0c06b | ||
|
|
4a5c808e21 | ||
|
|
fab8731f50 | ||
|
|
9eda7095e7 | ||
|
|
ee29f65a8e | ||
|
|
d2298e0105 | ||
|
|
f0b318fed3 | ||
|
|
68641758ab | ||
|
|
4302611bf7 | ||
|
|
9310f2e204 | ||
|
|
3685dae146 | ||
|
|
7ed3da2bee | ||
|
|
edfb4ce73a | ||
|
|
f679256612 | ||
|
|
383c38831a | ||
|
|
c3dc844b9a | ||
|
|
a7f909cad0 | ||
|
|
2df97627fe | ||
|
|
5d5492b018 | ||
|
|
741eaafee1 | ||
|
|
f0d7840b51 | ||
|
|
3d62daed59 | ||
|
|
d85b69632f | ||
|
|
c64c80b7fc | ||
|
|
875a8dbe65 | ||
|
|
c3bf90dd44 | ||
|
|
6db893a23d | ||
|
|
db03ab5976 | ||
|
|
55721e9e35 | ||
|
|
3d7b7d5e58 | ||
|
|
8971893e81 | ||
|
|
af68ac46cf | ||
|
|
951ed330a8 | ||
|
|
3babe9d76e | ||
|
|
adf6f1f80c | ||
|
|
ebaf3f9307 | ||
|
|
60f0d56ddf | ||
|
|
f94ddabeef | ||
|
|
74f85680e8 | ||
|
|
60f6b910cd | ||
|
|
e9bf062b55 | ||
|
|
4142896c82 | ||
|
|
70398dda8b | ||
|
|
63bedace6e | ||
|
|
bc677b69ca | ||
|
|
3bb0833704 | ||
|
|
29dad9ac7f | ||
|
|
ea29cc2c20 | ||
|
|
934f752820 | ||
|
|
bd28098db9 | ||
|
|
a1ff2a522d | ||
|
|
7a329c8647 | ||
|
|
f74a04155f | ||
|
|
e95f5f5ad7 | ||
|
|
8ffc1a253d | ||
|
|
b22805843b | ||
|
|
0045bbcd8b | ||
|
|
90ed19b192 | ||
|
|
402ececdde | ||
|
|
4c4b56c1a8 | ||
|
|
7277b7e8ec | ||
|
|
7f1466eeb0 | ||
|
|
fb8ba366ca | ||
|
|
fd5b5cab4e | ||
|
|
62abaf51d7 | ||
|
|
51926cd41c | ||
|
|
fef3fd4817 | ||
|
|
11a120b056 | ||
|
|
86f76f71ea | ||
|
|
ee41f9c322 | ||
|
|
5ad0f1e1fc | ||
|
|
e432deee2c | ||
|
|
2b64f974ec | ||
|
|
46d3e91483 | ||
|
|
105bf5b865 | ||
|
|
73be332b4d | ||
|
|
eb69190f18 | ||
|
|
3096f8e311 | ||
|
|
419b3ae82d | ||
|
|
563c9507d5 | ||
|
|
13ccf1b851 | ||
|
|
e312d425b8 | ||
|
|
517141a5f4 | ||
|
|
433eb0aa0b | ||
|
|
5680895daa | ||
|
|
3f426ffd35 | ||
|
|
2ec5caf456 | ||
|
|
2540ec0bc3 | ||
|
|
4f81046a40 | ||
|
|
1e6ae76a2e | ||
|
|
e2afc7a0cd | ||
|
|
9c30e9e83e | ||
|
|
b28ebf3ca9 | ||
|
|
a642024500 | ||
|
|
4b61fdf5d9 | ||
|
|
0e13f97b8c | ||
|
|
0475421520 | ||
|
|
c7c17676e2 | ||
|
|
6a85baede6 | ||
|
|
a935caf588 | ||
|
|
34ac9b69f4 | ||
|
|
7174edab5a | ||
|
|
6bc2c2167e | ||
|
|
634738a24d | ||
|
|
567e62abe2 | ||
|
|
b508d9e306 | ||
|
|
768c0e289a | ||
|
|
f9319906b0 | ||
|
|
b33d88861c | ||
|
|
088be6e970 | ||
|
|
a6d52b4a44 | ||
|
|
0ff82e143f | ||
|
|
977cd6c9b6 | ||
|
|
53b0d56209 | ||
|
|
079359749d | ||
|
|
0b92134160 | ||
|
|
1a7b615cf8 | ||
|
|
7479b95179 |
@@ -1,5 +1,5 @@
|
||||
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
||||
# for clang-format 17.0.1
|
||||
# for clang-format 20.0.0
|
||||
Language: Cpp
|
||||
BasedOnStyle: "WebKit"
|
||||
# AccessModifierOffset: 2
|
||||
@@ -26,9 +26,9 @@ AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: Inline
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
BreakAfterReturnType: Automatic
|
||||
AlwaysBreakBeforeMultilineStrings: true
|
||||
AlwaysBreakTemplateDeclarations: Yes
|
||||
BreakTemplateDeclarations: Yes
|
||||
# AttributeMacros:
|
||||
# - __pragma
|
||||
# - _Pragma
|
||||
@@ -145,7 +145,7 @@ PointerAlignment: Left
|
||||
# - constexpr
|
||||
# - type
|
||||
ReferenceAlignment: Left
|
||||
ReflowComments: true
|
||||
ReflowComments: Always
|
||||
RemoveBracesLLVM: false
|
||||
RemoveParentheses: Leave
|
||||
RemoveSemicolon: false
|
||||
@@ -188,3 +188,4 @@ TabWidth: 4
|
||||
UseTab: Never
|
||||
# VerilogBreakBetweenInstancePorts:
|
||||
# WhitespaceSensitiveMacros:
|
||||
RemoveEmptyLinesInUnwrappedLines: true
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
290cc30f153a0206bd870a0a58cb6338aa16ea34
|
||||
db9afdc77e85d5fc462d923fca5318be021656cd
|
||||
a5daac889a55baf8895918d4964f20dad1938470
|
||||
9ed30c5658c88edf1ef839771a53c7d599183b8b
|
||||
|
||||
# incorrect format of 3rdparty/resource/Arknights-Tile-Pos/levels.json
|
||||
65d654e54b9d04d1902c9ee9f9fb2679520adafd
|
||||
@@ -42,6 +43,9 @@ bc3ad67a02cb3b8e154c06955cf17091c4265000
|
||||
# oxipng template optimization
|
||||
e3d63894b28b2ef5e2405e144a32a6981de5e1b2
|
||||
|
||||
# refactor: divide tasks.json into multiple jsons
|
||||
dce6e317c8e56836662b64ac4b3d1a69b4ff4dd8
|
||||
|
||||
# usage: add "[blame ignore]" to the commit message
|
||||
# This file is managed by an automated workflow
|
||||
# Do not add, remove or modify lines below this comment
|
||||
|
||||
7
.github/ISSUE_TEMPLATE/cn-bug-report.yaml
vendored
7
.github/ISSUE_TEMPLATE/cn-bug-report.yaml
vendored
@@ -39,12 +39,11 @@ body:
|
||||
attributes:
|
||||
label: 日志和配置文件
|
||||
description: |
|
||||
**请在关闭 MAA 后,上传以下 5 个文件:**
|
||||
1. `debug` 文件夹中的 `asst.log` `gui.log` `asst.bak.log` 和 `gui.bak.log` 日志文件,并说明问题出现的大致时间点
|
||||
2. `config` 文件夹中的 `gui.json` 配置文件
|
||||
**请在 MAA -> 设置 -> 问题反馈中找到生成日志压缩包按钮,点击并上传压缩包**
|
||||
|
||||
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
|
||||
|
||||
如果你在使用 MacBook,请点击屏幕左上角的“文件”,点击“打开日志文件夹”
|
||||
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
|
||||
placeholder: |
|
||||
请确认上传文件前已关闭 MAA
|
||||
validations:
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/cn-ld-report.yaml
vendored
8
.github/ISSUE_TEMPLATE/cn-ld-report.yaml
vendored
@@ -11,7 +11,7 @@ body:
|
||||
required: true
|
||||
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
|
||||
required: true
|
||||
- label: 我已检查了置顶议题(Pinned Issue),确认我的问题未被提及
|
||||
- label: 我已检查了[公告](/MaaAssistantArknights/MaaAssistantArknights/issues/7732)、[活跃议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues)、[已关闭议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues?q=is%3Aissue%20state%3Aclosed),确认我的问题未被提及
|
||||
required: true
|
||||
- label: 我正在使用最新的 MAA 公测版本和最新的官版雷电 9 模拟器
|
||||
required: true
|
||||
@@ -44,10 +44,8 @@ body:
|
||||
attributes:
|
||||
label: MAA 日志和配置文件
|
||||
description: |
|
||||
**请在关闭 MAA 后,上传以下三个文件:**
|
||||
1. `debug` 文件夹中的 `asst.log` 和 `gui.log` 日志文件,并说明问题出现的大致时间点
|
||||
若 asst.log 文件小于 10 KB,则需同时上传 asst.log.bak 文件
|
||||
2. `config` 文件夹中的 `gui.json` 配置文件
|
||||
**请在 MAA -> 设置 -> 问题反馈中找到生成日志压缩包按钮,点击并上传压缩包**
|
||||
|
||||
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
|
||||
placeholder: |
|
||||
请确认上传文件前已关闭 MAA
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/cn-mumu-report.yaml
vendored
8
.github/ISSUE_TEMPLATE/cn-mumu-report.yaml
vendored
@@ -11,7 +11,7 @@ body:
|
||||
required: true
|
||||
- label: 我填写了简短且清晰明确的标题,以便开发者在翻阅 Issue 列表时能快速确定大致问题。而不是“一个建议”、“卡住了”等
|
||||
required: true
|
||||
- label: 我已检查了置顶议题(Pinned Issue),确认我的问题未被提及
|
||||
- label: 我已检查了[公告](/MaaAssistantArknights/MaaAssistantArknights/issues/7732)、[活跃议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues)、[已关闭议题](https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues?q=is%3Aissue%20state%3Aclosed),确认我的问题未被提及
|
||||
required: true
|
||||
- label: 我正在使用最新的 MAA 公测版本和最新的官版或方舟专版 MuMu 模拟器
|
||||
required: true
|
||||
@@ -44,10 +44,8 @@ body:
|
||||
attributes:
|
||||
label: MAA 日志和配置文件
|
||||
description: |
|
||||
**请在关闭 MAA 后,上传以下三个文件:**
|
||||
1. `debug` 文件夹中的 `asst.log` 和 `gui.log` 日志文件,并说明问题出现的大致时间点
|
||||
若 asst.log 文件小于 10 KB,则需同时上传 asst.log.bak 文件
|
||||
2. `config` 文件夹中的 `gui.json` 配置文件
|
||||
**请在 MAA -> 设置 -> 问题反馈中找到生成日志压缩包按钮,点击并上传压缩包**
|
||||
|
||||
**请直接将完整的文件拖拽进来,而非自己裁切或复制的片段;若文件体积过大可压缩后再上传**
|
||||
placeholder: |
|
||||
请确认上传文件前已关闭 MAA
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/en-bug-report.yaml
vendored
8
.github/ISSUE_TEMPLATE/en-bug-report.yaml
vendored
@@ -44,13 +44,11 @@ body:
|
||||
attributes:
|
||||
label: Log and config files
|
||||
description: >-
|
||||
**After closing MAA, upload the following 5 files:**
|
||||
1. The `asst.log` `gui.log` `asst.bak.log` and `gui.bak.log` log file in the `debug` folder, and indicate the approximate point in time when the problem occurred.
|
||||
2. The `gui.json` config file in the `config` folder
|
||||
**Please locate the Generate Support Payload button under MAA Settings -> Issue Report, click the button, and upload the generated zip file**
|
||||
|
||||
**Please drag and drop the full file in, not your own cuttings or copies; compress it before uploading if too large.**
|
||||
|
||||
If you are using MacBook, please click the "File" option in the top-left corner of the screen, then click "Open Log Folder".
|
||||
**Please drag and drop the full file in, not your own cuttings or copies;**
|
||||
**compress it before uploading if too large.**
|
||||
placeholder: |
|
||||
Please confirm that MAA is not running before uploading files.
|
||||
validations:
|
||||
|
||||
6
.github/issue-checker.yml
vendored
6
.github/issue-checker.yml
vendored
@@ -522,7 +522,7 @@ labels:
|
||||
# `incomplete`
|
||||
- name: incomplete
|
||||
content: incomplete
|
||||
regexes: '(?:\[Uploading asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)…\]\(\))'
|
||||
regexes: '(?:\[Uploading asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)…\]\(\))|<!-- Uploading "(log|report)[^"]*\.zip"\.\.\. -->'
|
||||
mode: add
|
||||
skip-if:
|
||||
- skip all
|
||||
@@ -532,7 +532,7 @@ labels:
|
||||
- remove incomplete
|
||||
- name: complete
|
||||
content:
|
||||
regexes: '(?:\[asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)\]\([^\)]+\))'
|
||||
regexes: '(?:\[asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)\]\([^\)]+\))|(log|report)[^.]*.zip'
|
||||
- name: remove incomplete
|
||||
content: incomplete
|
||||
mode: remove
|
||||
@@ -547,7 +547,7 @@ labels:
|
||||
|
||||
comments:
|
||||
- name: Log upload failed
|
||||
regexes: '\[Uploading asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)…\]\(\)'
|
||||
regexes: '\[Uploading asst(?:.bak|)(?: - 副本|)(?:.log|)(?:.zip|)…\]\(\)|<!-- Uploading "log[^"]*\.zip"\.\.\. -->'
|
||||
content: "你的日志没有上传成功,请重新上传。\n\n\
|
||||
Your log did not upload successfully, please re-upload it."
|
||||
mode: add
|
||||
|
||||
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -89,6 +89,8 @@ jobs:
|
||||
fi
|
||||
echo >> CHANGELOG.md
|
||||
echo "**Full Changelog**: [$last_tag -> $this_tag](https://github.com/MaaAssistantArknights/MaaAssistantArknights/compare/${last_tag}...${this_tag})" >> CHANGELOG.md
|
||||
echo >> CHANGELOG.md
|
||||
echo "[已有 Mirror酱 CDK?前往 Mirror酱 高速下载](https://mirrorchyan.com/zh/projects?rid=MAA)" >> CHANGELOG.md
|
||||
|
||||
- name: Upload changelog to Github
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -417,7 +419,7 @@ jobs:
|
||||
|
||||
- name: Download Provisioning Profiles
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
uses: apple-actions/download-provisioning-profiles@v3
|
||||
uses: apple-actions/download-provisioning-profiles@v4
|
||||
with:
|
||||
bundle-id: "com.hguandl.MeoAsstMac"
|
||||
issuer-id: ${{ secrets.HGUANDL_APPSTORE_ISSUER }}
|
||||
|
||||
18
.github/workflows/markdown-checker.yml
vendored
18
.github/workflows/markdown-checker.yml
vendored
@@ -26,22 +26,30 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
show-progress: false
|
||||
|
||||
- name: Cache Primes
|
||||
id: cache-primes
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: lychee-cache
|
||||
|
||||
- name: Check dead links
|
||||
uses: lycheeverse/lychee-action@v2
|
||||
with:
|
||||
# 仅检查内部链接和 Github 相关链接
|
||||
# 仅检查内部链接,排除所有外部链接
|
||||
args: >
|
||||
--verbose --no-progress --cache --max-cache-age 1d
|
||||
--verbose --no-progress
|
||||
--cache --max-cache-age 1d --cache-exclude-status '429, 500..599'
|
||||
--exclude 'https?://.*'
|
||||
--include 'https?://github\.com/.*'
|
||||
--include 'https?://raw\.githubusercontent\.com/.*'
|
||||
--include 'https?://user-images\.githubusercontent\.com/.*'
|
||||
--exclude-path 'docs/zh-tw/manual/introduction/introduction_old.md'
|
||||
--exclude-path 'docs/ja-jp/manual/introduction/introduction_old.md'
|
||||
--exclude 'files/MAA_Runtime_Fix_Pwsh.ps1$'
|
||||
|
||||
38
.github/workflows/mirrorchyan.yml
vendored
38
.github/workflows/mirrorchyan.yml
vendored
@@ -8,7 +8,8 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: MirrorChyan/uploading-action@v1
|
||||
- name: Upload MAA win x64
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
if: always()
|
||||
with:
|
||||
filetype: latest-release
|
||||
@@ -22,7 +23,8 @@ jobs:
|
||||
os: win
|
||||
arch: x64
|
||||
|
||||
- uses: MirrorChyan/uploading-action@v1
|
||||
- name: Upload MAA win arm64
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
if: always()
|
||||
with:
|
||||
filetype: latest-release
|
||||
@@ -35,3 +37,35 @@ jobs:
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
os: win
|
||||
arch: arm64
|
||||
|
||||
- name: Upload MAA macos arm64
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
if: always()
|
||||
with:
|
||||
filetype: latest-release
|
||||
filename: "MAA-*-macos-universal.dmg"
|
||||
extra_zip: true
|
||||
mirrorchyan_rid: MAA
|
||||
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
os: macos
|
||||
arch: arm64
|
||||
|
||||
- name: Upload MAA macos x64
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
if: always()
|
||||
with:
|
||||
filetype: latest-release
|
||||
filename: "MAA-*-macos-universal.dmg"
|
||||
extra_zip: true
|
||||
mirrorchyan_rid: MAA
|
||||
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: ${{ github.event.repository.name }}
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
os: macos
|
||||
arch: x64
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- id: uploading
|
||||
- name: Release Note for MAA
|
||||
uses: MirrorChyan/release-note-action@v1
|
||||
with:
|
||||
mirrorchyan_rid: MAA
|
||||
|
||||
17
.github/workflows/optimize-templates.yml
vendored
17
.github/workflows/optimize-templates.yml
vendored
@@ -55,16 +55,17 @@ jobs:
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Cache Python packages
|
||||
id: cache_python
|
||||
if: steps.check_push.outputs.is_pr != 'True' && always()
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.pythonLocation }}/lib/python3.11/site-packages
|
||||
key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
|
||||
# - name: Cache Python packages
|
||||
# id: cache_python
|
||||
# if: steps.check_push.outputs.is_pr != 'True' && always()
|
||||
# uses: actions/cache@v4
|
||||
# with:
|
||||
# path: ${{ env.pythonLocation }}/lib/python3.11/site-packages
|
||||
# key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.check_push.outputs.is_pr != 'True' && steps.cache_python.outputs.cache-hit != 'true'
|
||||
# if: steps.check_push.outputs.is_pr != 'True' && steps.cache_python.outputs.cache-hit != 'true'
|
||||
if: steps.check_push.outputs.is_pr != 'True'
|
||||
run: |
|
||||
pip install -r tools/OptimizeTemplates/requirements.txt
|
||||
|
||||
|
||||
62
.github/workflows/res-update-game.yml
vendored
62
.github/workflows/res-update-game.yml
vendored
@@ -124,47 +124,10 @@ jobs:
|
||||
path: ./excel
|
||||
compression-level: 0
|
||||
|
||||
original-json:
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initializization
|
||||
run: |
|
||||
urls=(
|
||||
"https://raw.githubusercontent.com/MaaAssistantArknights/MaaAssistantArknights/refs/heads/${{ github.ref_name }}/.prettierrc|.prettierrc"
|
||||
"https://raw.githubusercontent.com/MaaAssistantArknights/MaaAssistantArknights/refs/heads/${{ github.ref_name }}/tools/TaskSorter/TaskSorter.py|TaskSorter.py"
|
||||
"https://raw.githubusercontent.com/MaaAssistantArknights/MaaAssistantArknights/refs/heads/${{ github.ref_name }}/resource/tasks.json|tasks.json"
|
||||
"https://raw.githubusercontent.com/MaaAssistantArknights/MaaAssistantArknights/refs/heads/${{ github.ref_name }}/resource/global/txwy/resource/tasks.json|original/txwy.json"
|
||||
"https://raw.githubusercontent.com/MaaAssistantArknights/MaaAssistantArknights/refs/heads/${{ github.ref_name }}/resource/global/YoStarEN/resource/tasks.json|original/YoStarEN.json"
|
||||
"https://raw.githubusercontent.com/MaaAssistantArknights/MaaAssistantArknights/refs/heads/${{ github.ref_name }}/resource/global/YoStarJP/resource/tasks.json|original/YoStarJP.json"
|
||||
"https://raw.githubusercontent.com/MaaAssistantArknights/MaaAssistantArknights/refs/heads/${{ github.ref_name }}/resource/global/YoStarKR/resource/tasks.json|original/YoStarKR.json"
|
||||
)
|
||||
|
||||
mkdir -p original
|
||||
|
||||
printf "%s\n" "${urls[@]}" | xargs -P 6 -I {} bash -c '
|
||||
url=$(echo "{}" | cut -d"|" -f1)
|
||||
filename=$(echo "{}" | cut -d"|" -f2)
|
||||
curl -s -o "$filename" "$url" && echo "Downloaded $filename" || echo "Failed to download $filename" >&2
|
||||
'
|
||||
python3 TaskSorter.py --cn tasks.json --overseas EN:original/YoStarEN.json,JP:original/YoStarJP.json,KR:original/YoStarKR.json,TW:original/txwy.json
|
||||
|
||||
- name: Prettify original JSON
|
||||
uses: Nerixyz/actionsx-prettier@v3-adj
|
||||
with:
|
||||
args: -w original/YoStarEN.json original/YoStarJP.json original/YoStarKR.json original/txwy.json
|
||||
|
||||
- name: Upload Original
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: original
|
||||
path: ./original
|
||||
compression-level: 0
|
||||
|
||||
update-game-resources:
|
||||
# In case of rate limitations on the runners/instances, add dependency, by removing the comment
|
||||
|
||||
# needs: [clone-resources-official, clone-resources-overseas, clone-resources-txwy, original-json]
|
||||
# needs: [clone-resources-official, clone-resources-overseas, clone-resources-txwy]
|
||||
if: github.repository_owner == 'MaaAssistantArknights'
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
@@ -220,13 +183,6 @@ jobs:
|
||||
./tools/ResourceUpdater/x64/Release/opencv_world4_maa.dll
|
||||
./tools/ResourceUpdater/x64/Release/ResourceUpdater.exe
|
||||
|
||||
- name: Download original JSON
|
||||
id: download-original
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
with:
|
||||
name: original
|
||||
path: ./original
|
||||
|
||||
- name: Download txwy
|
||||
id: download-txwy
|
||||
uses: actions/download-artifact@v4.1.8
|
||||
@@ -367,20 +323,12 @@ jobs:
|
||||
branch: ${{ github.ref }}
|
||||
github_token: ${{ secrets.MAA_RESOURCE_SYNC }}
|
||||
|
||||
- name: Update OTA resource
|
||||
if: steps.update_version.outputs.update_resources == 'True'
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }}
|
||||
run: |
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml
|
||||
|
||||
# - name: Delete cache
|
||||
# if: always()
|
||||
# - name: Update OTA resource
|
||||
# if: steps.update_version.outputs.update_resources == 'True'
|
||||
# env:
|
||||
# GH_TOKEN: ${{ github.token }}
|
||||
# GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }}
|
||||
# run: |
|
||||
# echo "Deleting the cache..."
|
||||
# gh cache delete
|
||||
# gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml
|
||||
|
||||
- name: Add cancelled status
|
||||
if: steps.update_version.outputs.changes != 'True' || steps.add_files.outputs.have_commits != 'True'
|
||||
|
||||
6
.github/workflows/sync-resource.yml
vendored
6
.github/workflows/sync-resource.yml
vendored
@@ -49,9 +49,3 @@ jobs:
|
||||
git status
|
||||
git commit -m "$commit_msg" || exit 0
|
||||
git push
|
||||
|
||||
- name: Setup resource update
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }}
|
||||
run: |
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml
|
||||
|
||||
2
.github/workflows/website-workflow.yml
vendored
2
.github/workflows/website-workflow.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
- name: Setup Node.js environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
@@ -4,18 +4,18 @@ ci:
|
||||
autofix_prs: true
|
||||
repos:
|
||||
- repo: https://github.com/shssoichiro/oxipng
|
||||
rev: v9.1.2
|
||||
rev: v9.1.4
|
||||
hooks:
|
||||
- id: oxipng
|
||||
args: ["-q", "-o", "2", "-s", "--ng"]
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v17.0.1
|
||||
rev: v20.1.0
|
||||
hooks:
|
||||
- id: clang-format
|
||||
files: ^src/MaaCore/.*
|
||||
args: ["--assume-filename", ".clang-format"]
|
||||
- repo: https://github.com/rbubley/mirrors-prettier
|
||||
rev: v3.5.1
|
||||
rev: v3.5.3
|
||||
hooks:
|
||||
- id: prettier
|
||||
files: ^((\.github/ISSUE_TEMPLATE|docs|resource|src|tools|website)/.*|\.pre-commit-config\.yaml|package-definition\.json)
|
||||
@@ -23,7 +23,7 @@ repos:
|
||||
- yaml
|
||||
- json
|
||||
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
||||
rev: v0.13.0
|
||||
rev: v0.17.2
|
||||
hooks:
|
||||
- id: markdownlint-cli2
|
||||
files: ^docs/.*|^README\.md$
|
||||
|
||||
@@ -6,5 +6,10 @@ src/maa-cli
|
||||
src/MaaMacGui
|
||||
|
||||
website/
|
||||
docs/
|
||||
|
||||
resource/Arknights-Tile-Pos/
|
||||
tools/OptimizeTemplates/optimize_templates.json
|
||||
|
||||
CITATION.cff
|
||||
CHANGELOG.md
|
||||
|
||||
320
3rdparty/include/meojson/common/array.hpp
vendored
320
3rdparty/include/meojson/common/array.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <initializer_list>
|
||||
@@ -37,37 +39,86 @@ public:
|
||||
// explicit basic_array(const basic_value<string_t>& val);
|
||||
// explicit basic_array(basic_value<string_t>&& val);
|
||||
|
||||
template <typename collection_t,
|
||||
std::enable_if_t<_utils::is_collection<collection_t> &&
|
||||
std::is_constructible_v<value_type, _utils::range_value_t<collection_t>>,
|
||||
bool> = true>
|
||||
template <
|
||||
typename collection_t,
|
||||
std::enable_if_t<
|
||||
_utils::is_collection<collection_t>
|
||||
&& std::is_constructible_v<value_type, _utils::range_value_t<collection_t>>,
|
||||
bool> = true>
|
||||
basic_array(collection_t arr)
|
||||
: _array_data(std::make_move_iterator(arr.begin()), std::make_move_iterator(arr.end()))
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_array(const jsonization_t& value) : basic_array(value.to_json())
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_array(const jsonization_t& value) : basic_array(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename fixed_array_t,
|
||||
std::enable_if_t<_utils::is_fixed_array<fixed_array_t>, bool> = true>
|
||||
basic_array(const fixed_array_t& arr)
|
||||
: _array_data(arr.begin(), arr.end())
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_array(const jsonization_t& value)
|
||||
: basic_array(value.to_json())
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_array(const jsonization_t& value)
|
||||
: basic_array(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename... elem_ts>
|
||||
basic_array(const std::tuple<elem_ts...>& tup)
|
||||
{
|
||||
foreach_tuple(tup, std::make_index_sequence<std::tuple_size_v<std::tuple<elem_ts...>>>());
|
||||
}
|
||||
template <typename first_t, typename second_t>
|
||||
basic_array(std::pair<first_t, second_t> pair)
|
||||
: _array_data({ std::move(pair.first), std::move(pair.second) })
|
||||
{
|
||||
}
|
||||
|
||||
~basic_array() noexcept = default;
|
||||
|
||||
bool empty() const noexcept { return _array_data.empty(); }
|
||||
|
||||
size_t size() const noexcept { return _array_data.size(); }
|
||||
|
||||
bool contains(size_t pos) const { return pos < _array_data.size(); }
|
||||
|
||||
bool exists(size_t pos) const { return contains(pos); }
|
||||
|
||||
const basic_value<string_t>& at(size_t pos) const;
|
||||
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const
|
||||
{
|
||||
return indent ? format(*indent) : to_string();
|
||||
}
|
||||
|
||||
string_t to_string() const;
|
||||
|
||||
string_t format(size_t indent = 4) const { return format(indent, 0); }
|
||||
|
||||
template <typename value_t>
|
||||
bool all() const;
|
||||
template <typename value_t, template <typename...> typename collection_t = std::vector>
|
||||
collection_t<value_t> as_collection() const;
|
||||
template <
|
||||
typename value_t,
|
||||
size_t Size,
|
||||
template <typename, size_t> typename fixed_array_t = std::array>
|
||||
fixed_array_t<value_t, Size> as_fixed_array() const;
|
||||
template <typename... elem_ts>
|
||||
std::tuple<elem_ts...> as_tuple() const;
|
||||
template <typename first_t, typename second_t>
|
||||
std::pair<first_t, second_t> as_pair() const;
|
||||
|
||||
// Usage: get(key_1, key_2, ..., default_value);
|
||||
template <typename... key_then_default_value_t>
|
||||
@@ -112,23 +163,54 @@ public:
|
||||
|
||||
basic_array<string_t>& operator=(const basic_array<string_t>&) = default;
|
||||
basic_array<string_t>& operator=(basic_array<string_t>&&) noexcept = default;
|
||||
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_array<string_t>>, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
std::enable_if_t<std::is_convertible_v<value_t, basic_array<string_t>>, bool> = true>
|
||||
basic_array<string_t>& operator=(value_t rhs)
|
||||
{
|
||||
return *this = basic_array<string_t>(std::move(rhs));
|
||||
}
|
||||
|
||||
bool operator==(const basic_array<string_t>& rhs) const;
|
||||
|
||||
bool operator!=(const basic_array<string_t>& rhs) const { return !(*this == rhs); }
|
||||
|
||||
template <typename value_t, template <typename...> typename collection_t = std::vector,
|
||||
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
|
||||
template <
|
||||
typename value_t,
|
||||
template <typename...> typename collection_t = std::vector,
|
||||
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
|
||||
explicit operator collection_t<value_t>() const
|
||||
{
|
||||
return as_collection<value_t, collection_t>();
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
size_t Size,
|
||||
template <typename, size_t> typename fixed_array_t = std::array,
|
||||
std::enable_if_t<_utils::is_fixed_array<fixed_array_t<value_t, Size>>, bool> = true>
|
||||
explicit operator fixed_array_t<value_t, Size>() const
|
||||
{
|
||||
return as_fixed_array<value_t, Size, fixed_array_t>();
|
||||
}
|
||||
|
||||
template <typename... elem_ts>
|
||||
explicit operator std::tuple<elem_ts...>() const
|
||||
{
|
||||
return as_tuple<elem_ts...>();
|
||||
}
|
||||
|
||||
template <typename elem1_t, typename elem2_t>
|
||||
explicit operator std::pair<elem1_t, elem2_t>() const
|
||||
{
|
||||
return as_pair<elem1_t, elem2_t>();
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> =
|
||||
true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -137,8 +219,12 @@ public:
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<
|
||||
_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value,
|
||||
bool> = true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -150,13 +236,25 @@ public:
|
||||
|
||||
private:
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
auto
|
||||
get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
template <typename value_t, typename... rest_keys_t>
|
||||
auto get_helper(const value_t& default_value, size_t pos, rest_keys_t&&... rest) const;
|
||||
template <typename value_t>
|
||||
auto get_helper(const value_t& default_value, size_t pos) const;
|
||||
|
||||
template <typename tuple_t>
|
||||
tuple_t as_tuple_templ() const;
|
||||
template <size_t index, typename tuple_t>
|
||||
void set_tuple(tuple_t& tup) const;
|
||||
|
||||
template <typename Tuple, std::size_t... Is>
|
||||
void foreach_tuple(const Tuple& t, std::index_sequence<Is...>)
|
||||
{
|
||||
(_array_data.emplace_back(std::get<Is>(t)), ...);
|
||||
}
|
||||
|
||||
string_t format(size_t indent, size_t indent_times) const;
|
||||
|
||||
private:
|
||||
@@ -164,15 +262,20 @@ private:
|
||||
};
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t>::basic_array(std::initializer_list<value_type> init_list) : _array_data(init_list)
|
||||
{}
|
||||
inline basic_array<string_t>::basic_array(std::initializer_list<value_type> init_list)
|
||||
: _array_data(init_list)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t>::basic_array(typename raw_array::size_type size) : _array_data(size)
|
||||
{}
|
||||
inline basic_array<string_t>::basic_array(typename raw_array::size_type size)
|
||||
: _array_data(size)
|
||||
{
|
||||
}
|
||||
|
||||
// template <typename string_t>
|
||||
// inline basic_array<string_t>::basic_array(const basic_value<string_t>& val) : basic_array<string_t>(val.as_array())
|
||||
// inline basic_array<string_t>::basic_array(const basic_value<string_t>& val) :
|
||||
// basic_array<string_t>(val.as_array())
|
||||
//{}
|
||||
//
|
||||
// template <typename string_t>
|
||||
@@ -202,8 +305,9 @@ template <typename string_t>
|
||||
template <typename... args_t>
|
||||
inline decltype(auto) basic_array<string_t>::emplace_back(args_t&&... args)
|
||||
{
|
||||
static_assert(std::is_constructible_v<value_type, args_t...>,
|
||||
"Parameter can't be used to construct a raw_array::value_type");
|
||||
static_assert(
|
||||
std::is_constructible_v<value_type, args_t...>,
|
||||
"Parameter can't be used to construct a raw_array::value_type");
|
||||
return _array_data.emplace_back(std::forward<args_t>(args)...);
|
||||
}
|
||||
|
||||
@@ -266,18 +370,18 @@ inline bool basic_array<string_t>::all() const
|
||||
|
||||
namespace _as_collection_helper
|
||||
{
|
||||
template <typename T>
|
||||
class has_emplace_back
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int) -> decltype(std::declval<U>().emplace_back(), std::true_type());
|
||||
template <typename T>
|
||||
class has_emplace_back
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int) -> decltype(std::declval<U>().emplace_back(), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
|
||||
public:
|
||||
static constexpr bool value = decltype(test<T>(0))::value;
|
||||
};
|
||||
public:
|
||||
static constexpr bool value = decltype(test<T>(0))::value;
|
||||
};
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -298,31 +402,94 @@ inline collection_t<value_t> basic_array<string_t>::as_collection() const
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, size_t Size, template <typename, size_t> typename fixed_array_t>
|
||||
inline fixed_array_t<value_t, Size> basic_array<string_t>::as_fixed_array() const
|
||||
{
|
||||
if (size() != Size) {
|
||||
throw exception("Wrong array size");
|
||||
}
|
||||
|
||||
fixed_array_t<value_t, Size> result;
|
||||
for (size_t i = 0; i < Size; ++i) {
|
||||
result.at(i) = _array_data.at(i).template as<value_t>();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <size_t index, typename tuple_t>
|
||||
inline void basic_array<string_t>::set_tuple(tuple_t& tup) const
|
||||
{
|
||||
using elem_t = std::tuple_element_t<index, tuple_t>;
|
||||
|
||||
if constexpr (index > 0) {
|
||||
set_tuple<index - 1>(tup);
|
||||
}
|
||||
|
||||
std::get<index>(tup) = static_cast<elem_t>(at(index));
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename tuple_t>
|
||||
inline tuple_t basic_array<string_t>::as_tuple_templ() const
|
||||
{
|
||||
constexpr size_t tuple_size = std::tuple_size_v<tuple_t>;
|
||||
|
||||
if (size() != tuple_size) {
|
||||
throw exception("Wrong array size");
|
||||
}
|
||||
|
||||
tuple_t result;
|
||||
set_tuple<tuple_size - 1>(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... elem_ts>
|
||||
inline std::tuple<elem_ts...> basic_array<string_t>::as_tuple() const
|
||||
{
|
||||
return as_tuple_templ<std::tuple<elem_ts...>>();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename first_t, typename second_t>
|
||||
inline std::pair<first_t, second_t> basic_array<string_t>::as_pair() const
|
||||
{
|
||||
return as_tuple_templ<std::pair<first_t, second_t>>();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... key_then_default_value_t>
|
||||
inline auto basic_array<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
|
||||
{
|
||||
return get(std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
return get(
|
||||
std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
inline auto basic_array<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
inline auto basic_array<string_t>::get(
|
||||
std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
{
|
||||
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
|
||||
return get_helper(std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
return get_helper(
|
||||
std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, typename... rest_keys_t>
|
||||
inline auto basic_array<string_t>::get_helper(const value_t& default_value, size_t pos, rest_keys_t&&... rest) const
|
||||
inline auto basic_array<string_t>::get_helper(
|
||||
const value_t& default_value,
|
||||
size_t pos,
|
||||
rest_keys_t&&... rest) const
|
||||
{
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
|
||||
std::is_same_v<basic_array<string_t>, value_t> ||
|
||||
std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|
||||
|| std::is_same_v<basic_array<string_t>, value_t>
|
||||
|| std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
|
||||
|
||||
if (!contains(pos)) {
|
||||
@@ -341,9 +508,9 @@ template <typename string_t>
|
||||
template <typename value_t>
|
||||
inline auto basic_array<string_t>::get_helper(const value_t& default_value, size_t pos) const
|
||||
{
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
|
||||
std::is_same_v<basic_array<string_t>, value_t> ||
|
||||
std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|
||||
|| std::is_same_v<basic_array<string_t>, value_t>
|
||||
|| std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
|
||||
|
||||
if (!contains(pos)) {
|
||||
@@ -382,7 +549,8 @@ inline std::optional<value_t> basic_array<string_t>::find(size_t pos) const
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto& val = _array_data.at(pos);
|
||||
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>()) : std::nullopt;
|
||||
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>())
|
||||
: std::nullopt;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -434,25 +602,29 @@ inline typename basic_array<string_t>::reverse_iterator basic_array<string_t>::r
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::rbegin() const noexcept
|
||||
inline typename basic_array<string_t>::const_reverse_iterator
|
||||
basic_array<string_t>::rbegin() const noexcept
|
||||
{
|
||||
return _array_data.rbegin();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::rend() const noexcept
|
||||
inline typename basic_array<string_t>::const_reverse_iterator
|
||||
basic_array<string_t>::rend() const noexcept
|
||||
{
|
||||
return _array_data.rend();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::crbegin() const noexcept
|
||||
inline typename basic_array<string_t>::const_reverse_iterator
|
||||
basic_array<string_t>::crbegin() const noexcept
|
||||
{
|
||||
return _array_data.crbegin();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_array<string_t>::const_reverse_iterator basic_array<string_t>::crend() const noexcept
|
||||
inline typename basic_array<string_t>::const_reverse_iterator
|
||||
basic_array<string_t>::crend() const noexcept
|
||||
{
|
||||
return _array_data.crend();
|
||||
}
|
||||
@@ -470,7 +642,8 @@ inline const basic_value<string_t>& basic_array<string_t>::operator[](size_t pos
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t> basic_array<string_t>::operator+(const basic_array<string_t>& rhs) const&
|
||||
inline basic_array<string_t>
|
||||
basic_array<string_t>::operator+(const basic_array<string_t>& rhs) const&
|
||||
{
|
||||
basic_array<string_t> temp = *this;
|
||||
temp._array_data.insert(_array_data.end(), rhs.begin(), rhs.end());
|
||||
@@ -481,8 +654,10 @@ template <typename string_t>
|
||||
inline basic_array<string_t> basic_array<string_t>::operator+(basic_array<string_t>&& rhs) const&
|
||||
{
|
||||
basic_array<string_t> temp = *this;
|
||||
temp._array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
temp._array_data.insert(
|
||||
_array_data.end(),
|
||||
std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
return temp;
|
||||
}
|
||||
|
||||
@@ -496,7 +671,10 @@ inline basic_array<string_t> basic_array<string_t>::operator+(const basic_array<
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t> basic_array<string_t>::operator+(basic_array<string_t>&& rhs) &&
|
||||
{
|
||||
_array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
|
||||
_array_data.insert(
|
||||
_array_data.end(),
|
||||
std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
return std::move(*this);
|
||||
}
|
||||
|
||||
@@ -510,7 +688,10 @@ inline basic_array<string_t>& basic_array<string_t>::operator+=(const basic_arra
|
||||
template <typename string_t>
|
||||
inline basic_array<string_t>& basic_array<string_t>::operator+=(basic_array<string_t>&& rhs)
|
||||
{
|
||||
_array_data.insert(_array_data.end(), std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
|
||||
_array_data.insert(
|
||||
_array_data.end(),
|
||||
std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -520,11 +701,14 @@ inline bool basic_array<string_t>::operator==(const basic_array<string_t>& rhs)
|
||||
return _array_data == rhs._array_data;
|
||||
}
|
||||
|
||||
template <typename ostream_t, typename string_t,
|
||||
typename std_ostream_t =
|
||||
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
|
||||
typename enable_t =
|
||||
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
template <
|
||||
typename ostream_t,
|
||||
typename string_t,
|
||||
typename std_ostream_t = std::basic_ostream<
|
||||
typename string_t::value_type,
|
||||
std::char_traits<typename string_t::value_type>>,
|
||||
typename enable_t = std::enable_if_t<
|
||||
std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
ostream_t& operator<<(ostream_t& out, const basic_array<string_t>& arr)
|
||||
{
|
||||
out << arr.format();
|
||||
|
||||
13
3rdparty/include/meojson/common/exception.hpp
vendored
13
3rdparty/include/meojson/common/exception.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
@@ -9,7 +11,11 @@ class exception : public std::exception
|
||||
{
|
||||
public:
|
||||
exception() = default;
|
||||
exception(const std::string& msg) : _what(msg) {}
|
||||
|
||||
exception(const std::string& msg)
|
||||
: _what(msg)
|
||||
{
|
||||
}
|
||||
|
||||
exception(const exception&) = default;
|
||||
exception& operator=(const exception&) = default;
|
||||
@@ -18,7 +24,10 @@ public:
|
||||
|
||||
virtual ~exception() noexcept override = default;
|
||||
|
||||
virtual const char* what() const noexcept override { return _what.empty() ? "Unknown exception" : _what.c_str(); }
|
||||
virtual const char* what() const noexcept override
|
||||
{
|
||||
return _what.empty() ? "Unknown exception" : _what.c_str();
|
||||
}
|
||||
|
||||
protected:
|
||||
std::string _what;
|
||||
|
||||
174
3rdparty/include/meojson/common/object.hpp
vendored
174
3rdparty/include/meojson/common/object.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <initializer_list>
|
||||
@@ -36,31 +38,54 @@ public:
|
||||
// explicit basic_object(const basic_value<string_t>& val);
|
||||
// explicit basic_object(basic_value<string_t>&& val);
|
||||
|
||||
template <typename map_t, std::enable_if_t<_utils::is_map<map_t> &&
|
||||
std::is_constructible_v<value_type, _utils::range_value_t<map_t>>,
|
||||
bool> = true>
|
||||
basic_object(map_t map) : _object_data(std::make_move_iterator(map.begin()), std::make_move_iterator(map.end()))
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_object(const jsonization_t& value) : basic_object(value.to_json())
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_object(const jsonization_t& value) : basic_object(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{}
|
||||
template <
|
||||
typename map_t,
|
||||
std::enable_if_t<
|
||||
_utils::is_map<map_t>
|
||||
&& std::is_constructible_v<value_type, _utils::range_value_t<map_t>>,
|
||||
bool> = true>
|
||||
basic_object(map_t map)
|
||||
: _object_data(std::make_move_iterator(map.begin()), std::make_move_iterator(map.end()))
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_object(const jsonization_t& value)
|
||||
: basic_object(value.to_json())
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_object(const jsonization_t& value)
|
||||
: basic_object(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{
|
||||
}
|
||||
|
||||
~basic_object() = default;
|
||||
|
||||
bool empty() const noexcept { return _object_data.empty(); }
|
||||
|
||||
size_t size() const noexcept { return _object_data.size(); }
|
||||
|
||||
bool contains(const string_t& key) const;
|
||||
|
||||
bool exists(const string_t& key) const { return contains(key); }
|
||||
|
||||
const basic_value<string_t>& at(const string_t& key) const;
|
||||
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const
|
||||
{
|
||||
return indent ? format(*indent) : to_string();
|
||||
}
|
||||
|
||||
string_t to_string() const;
|
||||
|
||||
string_t format(size_t indent = 4) const { return format(indent, 0); }
|
||||
|
||||
template <typename value_t>
|
||||
bool all() const;
|
||||
template <typename value_t, template <typename...> typename map_t = std::map>
|
||||
@@ -102,23 +127,32 @@ public:
|
||||
|
||||
basic_object<string_t>& operator=(const basic_object<string_t>&) = default;
|
||||
basic_object<string_t>& operator=(basic_object<string_t>&&) = default;
|
||||
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_object<string_t>>, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
std::enable_if_t<std::is_convertible_v<value_t, basic_object<string_t>>, bool> = true>
|
||||
basic_object<string_t>& operator=(value_t rhs)
|
||||
{
|
||||
return *this = basic_object<string_t>(std::move(rhs));
|
||||
}
|
||||
|
||||
bool operator==(const basic_object<string_t>& rhs) const;
|
||||
|
||||
bool operator!=(const basic_object<string_t>& rhs) const { return !(*this == rhs); }
|
||||
|
||||
template <typename value_t, template <typename...> typename map_t = std::map,
|
||||
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
|
||||
template <
|
||||
typename value_t,
|
||||
template <typename...> typename map_t = std::map,
|
||||
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
|
||||
explicit operator map_t<string_t, value_t>() const
|
||||
{
|
||||
return as_map<value_t, map_t>();
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> =
|
||||
true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -127,8 +161,12 @@ public:
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<
|
||||
_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value,
|
||||
bool> = true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -140,8 +178,9 @@ public:
|
||||
|
||||
private:
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
auto
|
||||
get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
template <typename value_t, typename... rest_keys_t>
|
||||
auto get_helper(const value_t& default_value, const string_t& key, rest_keys_t&&... rest) const;
|
||||
template <typename value_t>
|
||||
@@ -155,8 +194,11 @@ private:
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_object<string_t>::basic_object(std::initializer_list<value_type> init_list)
|
||||
: _object_data(std::make_move_iterator(init_list.begin()), std::make_move_iterator(init_list.end()))
|
||||
{}
|
||||
: _object_data(
|
||||
std::make_move_iterator(init_list.begin()),
|
||||
std::make_move_iterator(init_list.end()))
|
||||
{
|
||||
}
|
||||
|
||||
// template <typename string_t>
|
||||
// inline basic_object<string_t>::basic_object(const basic_value<string_t>& val) :
|
||||
@@ -202,9 +244,10 @@ template <typename string_t>
|
||||
template <typename... args_t>
|
||||
inline decltype(auto) basic_object<string_t>::emplace(args_t&&... args)
|
||||
{
|
||||
static_assert(std::is_constructible_v<value_type, args_t...>,
|
||||
"Parameter can't be used to construct a raw_object::value_type");
|
||||
return _object_data.emplace(std::forward<args_t>(args)...);
|
||||
static_assert(
|
||||
std::is_constructible_v<value_type, args_t...>,
|
||||
"Parameter can't be used to construct a raw_object::value_type");
|
||||
return _object_data.insert_or_assign(std::forward<args_t>(args)...);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -220,7 +263,8 @@ inline string_t basic_object<string_t>::to_string() const
|
||||
string_t str { '{' };
|
||||
for (auto iter = _object_data.cbegin(); iter != _object_data.cend();) {
|
||||
const auto& [key, val] = *iter;
|
||||
str += char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':' } + val.to_string();
|
||||
str +=
|
||||
char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':' } + val.to_string();
|
||||
if (++iter != _object_data.cend()) {
|
||||
str += ',';
|
||||
}
|
||||
@@ -238,8 +282,8 @@ inline string_t basic_object<string_t>::format(size_t indent, size_t indent_time
|
||||
string_t str { '{', '\n' };
|
||||
for (auto iter = _object_data.cbegin(); iter != _object_data.cend();) {
|
||||
const auto& [key, val] = *iter;
|
||||
str += body_indent + char_t('"') + _utils::unescape_string(key) + string_t { '\"', ':', ' ' } +
|
||||
val.format(indent, indent_times + 1);
|
||||
str += body_indent + char_t('"') + _utils::unescape_string(key)
|
||||
+ string_t { '\"', ':', ' ' } + val.format(indent, indent_times + 1);
|
||||
if (++iter != _object_data.cend()) {
|
||||
str += ',';
|
||||
}
|
||||
@@ -276,28 +320,33 @@ template <typename string_t>
|
||||
template <typename... key_then_default_value_t>
|
||||
inline auto basic_object<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
|
||||
{
|
||||
return get(std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
return get(
|
||||
std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
inline auto basic_object<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
inline auto basic_object<string_t>::get(
|
||||
std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
{
|
||||
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
|
||||
return get_helper(std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
return get_helper(
|
||||
std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, typename... rest_keys_t>
|
||||
inline auto basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key,
|
||||
rest_keys_t&&... rest) const
|
||||
inline auto basic_object<string_t>::get_helper(
|
||||
const value_t& default_value,
|
||||
const string_t& key,
|
||||
rest_keys_t&&... rest) const
|
||||
{
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
|
||||
std::is_same_v<basic_array<string_t>, value_t> ||
|
||||
std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|
||||
|| std::is_same_v<basic_array<string_t>, value_t>
|
||||
|| std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
|
||||
|
||||
if (!contains(key)) {
|
||||
@@ -314,11 +363,12 @@ inline auto basic_object<string_t>::get_helper(const value_t& default_value, con
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t>
|
||||
inline auto basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key) const
|
||||
inline auto
|
||||
basic_object<string_t>::get_helper(const value_t& default_value, const string_t& key) const
|
||||
{
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t> ||
|
||||
std::is_same_v<basic_array<string_t>, value_t> ||
|
||||
std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_json = std::is_same_v<basic_value<string_t>, value_t>
|
||||
|| std::is_same_v<basic_array<string_t>, value_t>
|
||||
|| std::is_same_v<basic_object<string_t>, value_t>;
|
||||
constexpr bool is_string = std::is_constructible_v<string_t, value_t> && !is_json;
|
||||
|
||||
if (!contains(key)) {
|
||||
@@ -358,7 +408,8 @@ inline std::optional<value_t> basic_object<string_t>::find(const string_t& key)
|
||||
return std::nullopt;
|
||||
}
|
||||
const auto& val = iter->second;
|
||||
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>()) : std::nullopt;
|
||||
return val.template is<value_t>() ? std::optional<value_t>(val.template as<value_t>())
|
||||
: std::nullopt;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -374,7 +425,8 @@ inline typename basic_object<string_t>::iterator basic_object<string_t>::end() n
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::begin() const noexcept
|
||||
inline typename basic_object<string_t>::const_iterator
|
||||
basic_object<string_t>::begin() const noexcept
|
||||
{
|
||||
return _object_data.begin();
|
||||
}
|
||||
@@ -386,7 +438,8 @@ inline typename basic_object<string_t>::const_iterator basic_object<string_t>::e
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename basic_object<string_t>::const_iterator basic_object<string_t>::cbegin() const noexcept
|
||||
inline typename basic_object<string_t>::const_iterator
|
||||
basic_object<string_t>::cbegin() const noexcept
|
||||
{
|
||||
return _object_data.cbegin();
|
||||
}
|
||||
@@ -410,7 +463,8 @@ inline basic_value<string_t>& basic_object<string_t>::operator[](string_t&& key)
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_object<string_t> basic_object<string_t>::operator|(const basic_object<string_t>& rhs) const&
|
||||
inline basic_object<string_t>
|
||||
basic_object<string_t>::operator|(const basic_object<string_t>& rhs) const&
|
||||
{
|
||||
basic_object<string_t> temp = *this;
|
||||
temp._object_data.insert(rhs.begin(), rhs.end());
|
||||
@@ -422,12 +476,15 @@ inline basic_object<string_t> basic_object<string_t>::operator|(basic_object<str
|
||||
{
|
||||
basic_object<string_t> temp = *this;
|
||||
// temp._object_data.merge(std::move(rhs._object_data));
|
||||
temp._object_data.insert(std::make_move_iterator(rhs.begin()), std::make_move_iterator(rhs.end()));
|
||||
temp._object_data.insert(
|
||||
std::make_move_iterator(rhs.begin()),
|
||||
std::make_move_iterator(rhs.end()));
|
||||
return temp;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_object<string_t> basic_object<string_t>::operator|(const basic_object<string_t>& rhs) &&
|
||||
inline basic_object<string_t>
|
||||
basic_object<string_t>::operator|(const basic_object<string_t>& rhs) &&
|
||||
{
|
||||
_object_data.insert(rhs.begin(), rhs.end());
|
||||
return std::move(*this);
|
||||
@@ -461,11 +518,14 @@ inline bool basic_object<string_t>::operator==(const basic_object<string_t>& rhs
|
||||
return _object_data == rhs._object_data;
|
||||
}
|
||||
|
||||
template <typename ostream_t, typename string_t,
|
||||
typename std_ostream_t =
|
||||
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
|
||||
typename enable_t =
|
||||
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
template <
|
||||
typename ostream_t,
|
||||
typename string_t,
|
||||
typename std_ostream_t = std::basic_ostream<
|
||||
typename string_t::value_type,
|
||||
std::char_traits<typename string_t::value_type>>,
|
||||
typename enable_t = std::enable_if_t<
|
||||
std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
ostream_t& operator<<(ostream_t& out, const basic_object<string_t>& obj)
|
||||
{
|
||||
out << obj.format();
|
||||
|
||||
179
3rdparty/include/meojson/common/serialization.hpp
vendored
179
3rdparty/include/meojson/common/serialization.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <type_traits>
|
||||
@@ -9,96 +11,101 @@ namespace json
|
||||
{
|
||||
namespace _serialization_helper
|
||||
{
|
||||
template <typename in_t, typename serializer_t>
|
||||
class is_serializable
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int) -> decltype(std::declval<serializer_t>()(std::declval<U>()), std::true_type());
|
||||
template <typename in_t, typename serializer_t>
|
||||
class is_serializable
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<serializer_t>()(std::declval<U>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
|
||||
public:
|
||||
static constexpr bool value = decltype(test<in_t>(0))::value;
|
||||
};
|
||||
public:
|
||||
static constexpr bool value = decltype(test<in_t>(0))::value;
|
||||
};
|
||||
|
||||
struct empty_serializer
|
||||
{
|
||||
// sample:
|
||||
// json::value operator()(const type_1&) const { return ...; }
|
||||
// json::value operator()(const type_2&) const { return ...; }
|
||||
// json::value operator()(const type_3&) const { return ...; }
|
||||
};
|
||||
struct empty_serializer
|
||||
{
|
||||
// sample:
|
||||
// json::value operator()(const type_1&) const { return ...; }
|
||||
// json::value operator()(const type_2&) const { return ...; }
|
||||
// json::value operator()(const type_3&) const { return ...; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
void unable_to_serialize()
|
||||
{
|
||||
static_assert(!sizeof(T), "Unable to serialize T. "
|
||||
template <typename T>
|
||||
void unable_to_serialize()
|
||||
{
|
||||
static_assert(
|
||||
!sizeof(T),
|
||||
"Unable to serialize T. "
|
||||
#ifdef _MSC_VER
|
||||
"See T below: " __FUNCSIG__
|
||||
"See T below: " __FUNCSIG__
|
||||
#else
|
||||
// "See T below: " __PRETTY_FUNCTION__
|
||||
// "See T below: " __PRETTY_FUNCTION__
|
||||
|
||||
#endif
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
namespace _serialization_helper
|
||||
{
|
||||
template <typename out_t, typename deserializer_t, typename string_t = default_string_t>
|
||||
class is_deserializable
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<deserializer_t>()(std::declval<basic_value<string_t>>(), std::declval<U&>()),
|
||||
std::true_type());
|
||||
template <typename out_t, typename deserializer_t, typename string_t = default_string_t>
|
||||
class is_deserializable
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<deserializer_t>()(std::declval<basic_value<string_t>>(), std::declval<U&>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
|
||||
public:
|
||||
static constexpr bool value = decltype(test<out_t>(0))::value;
|
||||
};
|
||||
public:
|
||||
static constexpr bool value = decltype(test<out_t>(0))::value;
|
||||
};
|
||||
|
||||
struct empty_deserializer
|
||||
{
|
||||
// sample:
|
||||
// bool operator()(const json::value&, type_1&) const { return ...; }
|
||||
// bool operator()(const json::value&, type_2&) const { return ...; }
|
||||
// bool operator()(const json::value&, type_3&) const { return ...; }
|
||||
};
|
||||
struct empty_deserializer
|
||||
{
|
||||
// sample:
|
||||
// bool operator()(const json::value&, type_1&) const { return ...; }
|
||||
// bool operator()(const json::value&, type_2&) const { return ...; }
|
||||
// bool operator()(const json::value&, type_3&) const { return ...; }
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
void unable_to_deserialize()
|
||||
{
|
||||
static_assert(!sizeof(T), "Unable to deserialize T. "
|
||||
template <typename T>
|
||||
void unable_to_deserialize()
|
||||
{
|
||||
static_assert(
|
||||
!sizeof(T),
|
||||
"Unable to deserialize T. "
|
||||
#ifdef _MSC_VER
|
||||
"See T below: " __FUNCSIG__
|
||||
"See T below: " __FUNCSIG__
|
||||
#else
|
||||
// "See T below: " __PRETTY_FUNCTION__
|
||||
// "See T below: " __PRETTY_FUNCTION__
|
||||
|
||||
#endif
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename in_t, typename serializer_t = _serialization_helper::empty_serializer,
|
||||
typename string_t = default_string_t>
|
||||
template <
|
||||
typename in_t,
|
||||
typename serializer_t = _serialization_helper::empty_serializer,
|
||||
typename string_t = default_string_t>
|
||||
basic_value<string_t> serialize(in_t&& in, const serializer_t& serializer = {})
|
||||
{
|
||||
if constexpr (_serialization_helper::is_serializable<in_t, serializer_t>::value) {
|
||||
return serializer(std::forward<in_t>(in));
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<basic_value<string_t>, in_t>) {
|
||||
return basic_value<string_t>(std::forward<in_t>(in));
|
||||
}
|
||||
else if constexpr (_utils::is_collection<std::decay_t<in_t>>) {
|
||||
else if constexpr (
|
||||
_utils::is_collection<std::decay_t<in_t>> || _utils::is_fixed_array<std::decay_t<in_t>>) {
|
||||
basic_array<string_t> arr;
|
||||
for (auto&& elem : in) {
|
||||
using elem_t = decltype(elem);
|
||||
|
||||
auto j_elem = serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
|
||||
auto j_elem =
|
||||
serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
|
||||
arr.emplace_back(std::move(j_elem));
|
||||
}
|
||||
return arr;
|
||||
@@ -109,27 +116,32 @@ basic_value<string_t> serialize(in_t&& in, const serializer_t& serializer = {})
|
||||
using key_t = decltype(key);
|
||||
using elem_t = decltype(elem);
|
||||
|
||||
auto j_elem = serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
|
||||
auto j_elem =
|
||||
serialize<elem_t, serializer_t, string_t>(std::forward<elem_t>(elem), serializer);
|
||||
obj.emplace(std::forward<key_t>(key), std::move(j_elem));
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<basic_value<string_t>, in_t>) {
|
||||
return basic_value<string_t>(std::forward<in_t>(in));
|
||||
}
|
||||
else {
|
||||
_serialization_helper::unable_to_serialize<in_t>();
|
||||
}
|
||||
}
|
||||
|
||||
template <typename out_t, typename deserializer_t = _serialization_helper::empty_deserializer,
|
||||
typename string_t = default_string_t>
|
||||
bool deserialize(const basic_value<string_t>& in, out_t& out, const deserializer_t& deserializer = {})
|
||||
template <
|
||||
typename out_t,
|
||||
typename deserializer_t = _serialization_helper::empty_deserializer,
|
||||
typename string_t = default_string_t>
|
||||
bool deserialize(
|
||||
const basic_value<string_t>& in,
|
||||
out_t& out,
|
||||
const deserializer_t& deserializer = {})
|
||||
{
|
||||
if constexpr (_serialization_helper::is_deserializable<out_t, deserializer_t>::value) {
|
||||
return deserializer(in, out);
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<out_t, basic_value<string_t>>) {
|
||||
out = out_t(in);
|
||||
return true;
|
||||
}
|
||||
else if constexpr (_utils::is_collection<std::decay_t<out_t>>) {
|
||||
if (!in.is_array()) {
|
||||
return false;
|
||||
@@ -149,20 +161,45 @@ bool deserialize(const basic_value<string_t>& in, out_t& out, const deserializer
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if constexpr (_utils::is_map<std::decay_t<out_t>>) {
|
||||
if (!in.is_object()) {
|
||||
else if constexpr (_utils::is_fixed_array<std::decay_t<out_t>>) {
|
||||
if (!in.is_array()) {
|
||||
return false;
|
||||
}
|
||||
for (auto&& [key, j_elem] : in.as_object()) {
|
||||
auto&& in_as_arr = in.as_array();
|
||||
constexpr size_t out_size = _utils::fixed_array_size<out_t>;
|
||||
if (in_as_arr.size() != out_size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < out_size; ++i) {
|
||||
auto&& j_elem = in_as_arr.at(i);
|
||||
using elem_t = typename out_t::value_type;
|
||||
elem_t elem {};
|
||||
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
|
||||
return false;
|
||||
}
|
||||
out.emplace(std::move(elem));
|
||||
out.at(i) = std::move(elem);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if constexpr (_utils::is_map<std::decay_t<out_t>>) {
|
||||
if (!in.is_object()) {
|
||||
return false;
|
||||
}
|
||||
for (auto&& [key, j_elem] : in.as_object()) {
|
||||
using elem_t = typename out_t::mapped_type;
|
||||
elem_t elem {};
|
||||
if (!deserialize<elem_t, deserializer_t, string_t>(j_elem, elem, deserializer)) {
|
||||
return false;
|
||||
}
|
||||
out.emplace(std::forward<decltype(key)>(key), std::move(elem));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<out_t, basic_value<string_t>>) {
|
||||
out = out_t(in);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
_serialization_helper::unable_to_deserialize<out_t>();
|
||||
}
|
||||
|
||||
4
3rdparty/include/meojson/common/types.hpp
vendored
4
3rdparty/include/meojson/common/types.hpp
vendored
@@ -1,5 +1,7 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "array.hpp"
|
||||
#include "object.hpp"
|
||||
#include "value.hpp"
|
||||
#include "value.hpp"
|
||||
|
||||
122
3rdparty/include/meojson/common/utils.hpp
vendored
122
3rdparty/include/meojson/common/utils.hpp
vendored
@@ -1,7 +1,14 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
|
||||
namespace json
|
||||
{
|
||||
@@ -61,12 +68,38 @@ constexpr bool is_container<T, std::void_t<typename T::value_type, range_value_t
|
||||
template <typename T, typename = void>
|
||||
constexpr bool is_map = false;
|
||||
template <typename T>
|
||||
constexpr bool is_map<T, std::void_t<typename T::key_type, typename T::mapped_type>> = is_container<T>;
|
||||
constexpr bool is_map<T, std::void_t<typename T::key_type, typename T::mapped_type>> =
|
||||
is_container<T>;
|
||||
|
||||
template <typename T, typename = void>
|
||||
constexpr bool is_fixed_array = false;
|
||||
template <template <typename, size_t> typename arr_t, typename value_t, size_t size>
|
||||
constexpr bool is_fixed_array<arr_t<value_t, size>> = true;
|
||||
|
||||
template <typename T, typename = std::enable_if_t<is_fixed_array<T>>>
|
||||
constexpr size_t fixed_array_size = 0;
|
||||
template <template <typename, size_t> typename arr_t, typename value_t, size_t size>
|
||||
constexpr size_t fixed_array_size<arr_t<value_t, size>> = size;
|
||||
|
||||
template <typename T, typename = void>
|
||||
constexpr bool is_collection = false;
|
||||
template <typename T>
|
||||
constexpr bool is_collection<T> = is_container<T> && !is_map<T>;
|
||||
constexpr bool is_collection<T> = is_container<T> && !is_map<T> && !is_fixed_array<T>;
|
||||
|
||||
template <typename T>
|
||||
constexpr bool is_variant = false;
|
||||
template <typename... args_t>
|
||||
constexpr bool is_variant<std::variant<args_t...>> = true;
|
||||
|
||||
template <typename T>
|
||||
constexpr bool is_tuple = false;
|
||||
template <typename... args_t>
|
||||
constexpr bool is_tuple<std::tuple<args_t...>> = true;
|
||||
|
||||
template <typename T>
|
||||
constexpr bool is_pair = false;
|
||||
template <typename... args_t>
|
||||
constexpr bool is_pair<std::pair<args_t...>> = true;
|
||||
|
||||
template <typename T>
|
||||
class has_to_json_in_member
|
||||
@@ -85,7 +118,8 @@ template <typename T>
|
||||
class has_to_json_in_templ_spec
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int) -> decltype(std::declval<ext::jsonization<U>>().to_json(std::declval<U>()), std::true_type());
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<ext::jsonization<U>>().to_json(std::declval<U>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
@@ -113,8 +147,7 @@ class has_check_json_in_templ_spec
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<ext::jsonization<U>>().check_json(std::declval<json::basic_value<string_t>>()),
|
||||
std::true_type());
|
||||
-> decltype(std::declval<ext::jsonization<U>>().check_json(std::declval<json::basic_value<string_t>>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
@@ -142,9 +175,7 @@ class has_from_json_in_templ_spec
|
||||
{
|
||||
template <typename U>
|
||||
static auto test(int)
|
||||
-> decltype(std::declval<ext::jsonization<U>>().from_json(std::declval<json::basic_value<string_t>>(),
|
||||
std::declval<U&>()),
|
||||
std::true_type());
|
||||
-> decltype(std::declval<ext::jsonization<U>>().from_json(std::declval<json::basic_value<string_t>>(), std::declval<U&>()), std::true_type());
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(...);
|
||||
@@ -154,7 +185,7 @@ public:
|
||||
};
|
||||
|
||||
template <typename string_t>
|
||||
static constexpr string_t unescape_string(const string_t& str)
|
||||
inline constexpr string_t unescape_string(const string_t& str)
|
||||
{
|
||||
using char_t = typename string_t::value_type;
|
||||
|
||||
@@ -202,26 +233,41 @@ static constexpr string_t unescape_string(const string_t& str)
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
static constexpr string_t true_string()
|
||||
inline constexpr string_t true_string()
|
||||
{
|
||||
return { 't', 'r', 'u', 'e' };
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
static constexpr string_t false_string()
|
||||
inline constexpr string_t false_string()
|
||||
{
|
||||
return { 'f', 'a', 'l', 's', 'e' };
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
static constexpr string_t null_string()
|
||||
inline constexpr string_t null_string()
|
||||
{
|
||||
return { 'n', 'u', 'l', 'l' };
|
||||
}
|
||||
|
||||
template <typename string_t, typename any_t>
|
||||
string_t to_basic_string(any_t&& arg)
|
||||
inline string_t to_basic_string(any_t&& arg)
|
||||
{
|
||||
#ifdef MEOJSON_KEEP_FLOATING_PRECISION
|
||||
using real_type = std::remove_reference_t<any_t>;
|
||||
if constexpr (std::is_floating_point_v<real_type>) {
|
||||
if constexpr (std::is_same_v<string_t, std::string>) {
|
||||
std::ostringstream oss;
|
||||
oss << std::setprecision(std::numeric_limits<real_type>::max_digits10) << arg;
|
||||
return oss.str();
|
||||
}
|
||||
else if constexpr (std::is_same_v<string_t, std::wstring>) {
|
||||
std::wostringstream oss;
|
||||
oss << std::setprecision(std::numeric_limits<real_type>::max_digits10) << arg;
|
||||
return oss.str();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if constexpr (std::is_same_v<string_t, std::string>) {
|
||||
return std::to_string(std::forward<any_t>(arg));
|
||||
}
|
||||
@@ -232,4 +278,54 @@ string_t to_basic_string(any_t&& arg)
|
||||
static_assert(!sizeof(any_t), "Unsupported type");
|
||||
}
|
||||
}
|
||||
|
||||
template <std::size_t id, typename string_t, typename variant_t>
|
||||
inline bool _serialize_variant_impl(basic_value<string_t>& val, variant_t&& var)
|
||||
{
|
||||
if (var.index() != id) {
|
||||
return false;
|
||||
}
|
||||
val = basic_value<string_t>(std::get<id>(std::forward<variant_t>(var)));
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename string_t, typename variant_t, std::size_t... ids>
|
||||
inline basic_value<string_t> serialize_variant(variant_t&& var, std::index_sequence<ids...>)
|
||||
{
|
||||
basic_value<string_t> val;
|
||||
(_serialize_variant_impl<ids>(val, std::forward<variant_t>(var)) || ...);
|
||||
return val;
|
||||
}
|
||||
|
||||
template <std::size_t id, typename string_t, typename variant_t>
|
||||
inline bool _deserialize_variant_impl(const basic_value<string_t>& val, variant_t& var)
|
||||
{
|
||||
using alt_t = std::variant_alternative_t<id, variant_t>;
|
||||
if (!val.template is<alt_t>()) {
|
||||
return false;
|
||||
}
|
||||
var = val.template as<alt_t>();
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename string_t, typename variant_t, std::size_t... ids>
|
||||
inline variant_t deserialize_variant(const basic_value<string_t>& val, std::index_sequence<ids...>)
|
||||
{
|
||||
variant_t var;
|
||||
(_deserialize_variant_impl<ids>(val, var) || ...);
|
||||
return var;
|
||||
}
|
||||
|
||||
template <typename string_t, typename variant_t, std::size_t... ids>
|
||||
inline bool detect_variant(const basic_value<string_t>& val, std::index_sequence<ids...>)
|
||||
{
|
||||
return (val.template is<std::variant_alternative_t<ids, variant_t>>() || ...);
|
||||
}
|
||||
|
||||
template <typename string_t, typename tuple_t, std::size_t... ids>
|
||||
inline bool detect_tuple(const basic_value<string_t>& val, std::index_sequence<ids...>)
|
||||
{
|
||||
return val.is_array() && val.as_array().size() == std::tuple_size_v<tuple_t>
|
||||
&& (val.at(ids).template is<std::tuple_element_t<ids, tuple_t>>() || ...);
|
||||
}
|
||||
} // namespace json::_utils
|
||||
|
||||
445
3rdparty/include/meojson/common/value.hpp
vendored
445
3rdparty/include/meojson/common/value.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
@@ -7,6 +9,8 @@
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <variant>
|
||||
|
||||
#include "exception.hpp"
|
||||
@@ -64,30 +68,87 @@ public:
|
||||
template <typename... args_t>
|
||||
basic_value(value_type type, args_t&&... args);
|
||||
|
||||
template <typename collection_t,
|
||||
std::enable_if_t<_utils::is_collection<collection_t> &&
|
||||
std::is_constructible_v<typename basic_array<string_t>::value_type,
|
||||
_utils::range_value_t<collection_t>>,
|
||||
bool> = true>
|
||||
basic_value(collection_t&& collection) : basic_value(basic_array<string_t>(std::forward<collection_t>(collection)))
|
||||
{}
|
||||
template <typename map_t, std::enable_if_t<_utils::is_map<map_t> &&
|
||||
std::is_constructible_v<typename basic_object<string_t>::value_type,
|
||||
_utils::range_value_t<map_t>>,
|
||||
bool> = true>
|
||||
basic_value(map_t&& map) : basic_value(basic_object<string_t>(std::forward<map_t>(map)))
|
||||
{}
|
||||
template <
|
||||
typename collection_t,
|
||||
std::enable_if_t<
|
||||
_utils::is_collection<collection_t>
|
||||
&& std::is_constructible_v<
|
||||
typename basic_array<string_t>::value_type,
|
||||
_utils::range_value_t<collection_t>>,
|
||||
bool> = true>
|
||||
basic_value(collection_t&& collection)
|
||||
: basic_value(basic_array<string_t>(std::forward<collection_t>(collection)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_value(const jsonization_t& value) : basic_value(value.to_json())
|
||||
{}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_value(const jsonization_t& value) : basic_value(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{}
|
||||
template <
|
||||
typename fixed_array_t,
|
||||
std::enable_if_t<_utils::is_fixed_array<fixed_array_t>, bool> = true>
|
||||
basic_value(const fixed_array_t& arr)
|
||||
: basic_value(basic_array<string_t>(arr))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename value_t, std::enable_if_t<!std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
|
||||
template <
|
||||
typename map_t,
|
||||
std::enable_if_t<
|
||||
_utils::is_map<map_t>
|
||||
&& std::is_constructible_v<
|
||||
typename basic_object<string_t>::value_type,
|
||||
_utils::range_value_t<map_t>>,
|
||||
bool> = true>
|
||||
basic_value(map_t&& map)
|
||||
: basic_value(basic_object<string_t>(std::forward<map_t>(map)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename enum_t, std::enable_if_t<std::is_enum_v<enum_t>, bool> = true>
|
||||
basic_value(enum_t e)
|
||||
: basic_value(static_cast<std::underlying_type_t<enum_t>>(e))
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_member<jsonization_t>::value, bool> = true>
|
||||
basic_value(const jsonization_t& value)
|
||||
: basic_value(value.to_json())
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_to_json_in_templ_spec<jsonization_t>::value, bool> = true>
|
||||
basic_value(const jsonization_t& value)
|
||||
: basic_value(ext::jsonization<jsonization_t>().to_json(value))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename... elem_ts>
|
||||
basic_value(std::tuple<elem_ts...>&& tup)
|
||||
: basic_value(basic_array<string_t>(std::forward<std::tuple<elem_ts...>>(tup)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename elem1_t, typename elem2_t>
|
||||
basic_value(std::pair<elem1_t, elem2_t>&& pair)
|
||||
: basic_value(basic_array<string_t>(std::pair<elem1_t, elem2_t>(pair)))
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename variant_t,
|
||||
std::enable_if_t<_utils::is_variant<std::decay_t<variant_t>>, bool> = true>
|
||||
basic_value(variant_t&& var)
|
||||
: basic_value(_utils::serialize_variant<string_t>(
|
||||
std::forward<variant_t>(var),
|
||||
std::make_index_sequence<std::variant_size_v<std::decay_t<variant_t>>>()))
|
||||
{
|
||||
}
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
std::enable_if_t<!std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
|
||||
basic_value(value_t) = delete;
|
||||
|
||||
// I don't know if you want to convert char to string or number, so I delete these constructors.
|
||||
@@ -99,13 +160,21 @@ public:
|
||||
~basic_value();
|
||||
|
||||
bool valid() const noexcept { return _type != value_type::invalid; }
|
||||
|
||||
bool empty() const noexcept { return is_null(); }
|
||||
|
||||
bool is_null() const noexcept { return _type == value_type::null; }
|
||||
|
||||
bool is_number() const noexcept { return _type == value_type::number; }
|
||||
|
||||
bool is_boolean() const noexcept { return _type == value_type::boolean; }
|
||||
|
||||
bool is_string() const noexcept { return _type == value_type::string; }
|
||||
|
||||
bool is_array() const noexcept { return _type == value_type::array; }
|
||||
|
||||
bool is_object() const noexcept { return _type == value_type::object; }
|
||||
|
||||
template <typename value_t>
|
||||
bool is() const noexcept;
|
||||
|
||||
@@ -114,9 +183,13 @@ public:
|
||||
|
||||
bool contains(const string_t& key) const;
|
||||
bool contains(size_t pos) const;
|
||||
|
||||
bool exists(const string_t& key) const { return contains(key); }
|
||||
|
||||
bool exists(size_t pos) const { return contains(pos); }
|
||||
|
||||
value_type type() const noexcept { return _type; }
|
||||
|
||||
const basic_value<string_t>& at(size_t pos) const;
|
||||
const basic_value<string_t>& at(const string_t& key) const;
|
||||
|
||||
@@ -148,6 +221,11 @@ public:
|
||||
|
||||
template <typename value_t, template <typename...> typename collection_t = std::vector>
|
||||
collection_t<value_t> as_collection() const;
|
||||
template <
|
||||
typename value_t,
|
||||
size_t Size,
|
||||
template <typename, size_t> typename fixed_array_t = std::array>
|
||||
fixed_array_t<value_t, Size> as_fixed_array() const;
|
||||
template <typename value_t, template <typename...> typename map_t = std::map>
|
||||
map_t<string_t, value_t> as_map() const;
|
||||
|
||||
@@ -162,20 +240,29 @@ public:
|
||||
|
||||
void clear() noexcept;
|
||||
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const { return indent ? format(*indent) : to_string(); }
|
||||
string_t dumps(std::optional<size_t> indent = std::nullopt) const
|
||||
{
|
||||
return indent ? format(*indent) : to_string();
|
||||
}
|
||||
|
||||
// return raw string
|
||||
string_t to_string() const;
|
||||
|
||||
string_t format(size_t indent = 4) const { return format(indent, 0); }
|
||||
|
||||
basic_value<string_t>& operator=(const basic_value<string_t>& rhs);
|
||||
basic_value<string_t>& operator=(basic_value<string_t>&&) noexcept;
|
||||
template <typename value_t, std::enable_if_t<std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
std::enable_if_t<std::is_convertible_v<value_t, basic_value<string_t>>, bool> = true>
|
||||
basic_value<string_t>& operator=(value_t rhs)
|
||||
{
|
||||
return *this = basic_value<string_t>(std::move(rhs));
|
||||
}
|
||||
|
||||
bool operator==(const basic_value<string_t>& rhs) const;
|
||||
|
||||
bool operator!=(const basic_value<string_t>& rhs) const { return !(*this == rhs); }
|
||||
|
||||
const basic_value<string_t>& operator[](size_t pos) const;
|
||||
@@ -200,34 +287,63 @@ public:
|
||||
basic_value<string_t>& operator+=(basic_array<string_t>&& rhs);
|
||||
|
||||
explicit operator bool() const { return as_boolean(); }
|
||||
|
||||
explicit operator int() const { return as_integer(); }
|
||||
|
||||
explicit operator unsigned() const { return as_unsigned(); }
|
||||
|
||||
explicit operator long() const { return as_long(); }
|
||||
|
||||
explicit operator unsigned long() const { return as_unsigned_long(); }
|
||||
|
||||
explicit operator long long() const { return as_long_long(); }
|
||||
|
||||
explicit operator unsigned long long() const { return as_unsigned_long_long(); }
|
||||
|
||||
explicit operator float() const { return as_float(); }
|
||||
|
||||
explicit operator double() const { return as_double(); }
|
||||
|
||||
explicit operator long double() const { return as_long_double(); }
|
||||
|
||||
explicit operator string_t() const { return as_string(); }
|
||||
|
||||
explicit operator basic_array<string_t>() const { return as_array(); }
|
||||
|
||||
explicit operator basic_object<string_t>() const { return as_object(); }
|
||||
|
||||
template <typename value_t, template <typename...> typename collection_t = std::vector,
|
||||
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
|
||||
template <
|
||||
typename value_t,
|
||||
template <typename...> typename collection_t = std::vector,
|
||||
std::enable_if_t<_utils::is_collection<collection_t<value_t>>, bool> = true>
|
||||
explicit operator collection_t<value_t>() const
|
||||
{
|
||||
return as_collection<value_t, collection_t>();
|
||||
}
|
||||
template <typename value_t, template <typename...> typename map_t = std::map,
|
||||
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
size_t Size,
|
||||
template <typename, size_t> typename fixed_array_t = std::array,
|
||||
std::enable_if_t<_utils::is_fixed_array<fixed_array_t<value_t, Size>>, bool> = true>
|
||||
explicit operator fixed_array_t<value_t, Size>() const
|
||||
{
|
||||
return as_fixed_array<value_t, Size, fixed_array_t>();
|
||||
}
|
||||
|
||||
template <
|
||||
typename value_t,
|
||||
template <typename...> typename map_t = std::map,
|
||||
std::enable_if_t<_utils::is_map<map_t<string_t, value_t>>, bool> = true>
|
||||
explicit operator map_t<string_t, value_t>() const
|
||||
{
|
||||
return as_map<value_t, map_t>();
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_member<jsonization_t, string_t>::value, bool> =
|
||||
true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -236,8 +352,12 @@ public:
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
template <typename jsonization_t,
|
||||
std::enable_if_t<_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value, bool> = true>
|
||||
|
||||
template <
|
||||
typename jsonization_t,
|
||||
std::enable_if_t<
|
||||
_utils::has_from_json_in_templ_spec<jsonization_t, string_t>::value,
|
||||
bool> = true>
|
||||
explicit operator jsonization_t() const
|
||||
{
|
||||
jsonization_t dst {};
|
||||
@@ -247,6 +367,32 @@ public:
|
||||
return dst;
|
||||
}
|
||||
|
||||
template <typename enum_t, std::enable_if_t<std::is_enum_v<enum_t>, bool> = true>
|
||||
explicit operator enum_t() const
|
||||
{
|
||||
return static_cast<enum_t>(static_cast<std::underlying_type_t<enum_t>>(*this));
|
||||
}
|
||||
|
||||
template <typename... elem_ts>
|
||||
explicit operator std::tuple<elem_ts...>() const
|
||||
{
|
||||
return as_array().template as_tuple<elem_ts...>();
|
||||
}
|
||||
|
||||
template <typename elem1_t, typename elem2_t>
|
||||
explicit operator std::pair<elem1_t, elem2_t>() const
|
||||
{
|
||||
return as_array().template as_pair<elem1_t, elem2_t>();
|
||||
}
|
||||
|
||||
template <typename... args_t>
|
||||
explicit operator std::variant<args_t...>() const
|
||||
{
|
||||
return _utils::deserialize_variant<string_t, std::variant<args_t...>>(
|
||||
*this,
|
||||
std::make_index_sequence<std::variant_size_v<std::variant<args_t...>>>());
|
||||
}
|
||||
|
||||
private:
|
||||
friend class basic_array<string_t>;
|
||||
friend class basic_object<string_t>;
|
||||
@@ -256,8 +402,9 @@ private:
|
||||
static var_t deep_copy(const var_t& src);
|
||||
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
auto get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
auto
|
||||
get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const;
|
||||
|
||||
template <typename value_t, typename first_key_t, typename... rest_keys_t>
|
||||
auto get_helper(const value_t& default_value, first_key_t&& first, rest_keys_t&&... rest) const;
|
||||
@@ -276,89 +423,125 @@ inline basic_value<string_t>::basic_value() = default;
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(const basic_value<string_t>& rhs)
|
||||
: _type(rhs._type), _raw_data(deep_copy(rhs._raw_data))
|
||||
{}
|
||||
: _type(rhs._type)
|
||||
, _raw_data(deep_copy(rhs._raw_data))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(basic_value<string_t>&& rhs) noexcept = default;
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(bool b)
|
||||
: _type(value_type::boolean),
|
||||
_raw_data(string_t(b ? _utils::true_string<string_t>() : _utils::false_string<string_t>()))
|
||||
{}
|
||||
: _type(value_type::boolean)
|
||||
, _raw_data(string_t(b ? _utils::true_string<string_t>() : _utils::false_string<string_t>()))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(int num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(unsigned num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(long num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(unsigned long num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(long long num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(unsigned long long num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(float num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(double num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(long double num)
|
||||
: _type(value_type::number), _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{}
|
||||
: _type(value_type::number)
|
||||
, _raw_data(_utils::to_basic_string<string_t>(num))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(const char_t* str) : _type(value_type::string), _raw_data(string_t(str))
|
||||
{}
|
||||
inline basic_value<string_t>::basic_value(const char_t* str)
|
||||
: _type(value_type::string)
|
||||
, _raw_data(string_t(str))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(string_t str) : _type(value_type::string), _raw_data(std::move(str))
|
||||
{}
|
||||
inline basic_value<string_t>::basic_value(string_t str)
|
||||
: _type(value_type::string)
|
||||
, _raw_data(std::move(str))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(std::nullptr_t) : _type(value_type::null)
|
||||
{}
|
||||
inline basic_value<string_t>::basic_value(std::nullptr_t)
|
||||
: _type(value_type::null)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(basic_array<string_t> arr)
|
||||
: _type(value_type::array), _raw_data(std::make_unique<basic_array<string_t>>(std::move(arr)))
|
||||
{}
|
||||
: _type(value_type::array)
|
||||
, _raw_data(std::make_unique<basic_array<string_t>>(std::move(arr)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(basic_object<string_t> obj)
|
||||
: _type(value_type::object), _raw_data(std::make_unique<basic_object<string_t>>(std::move(obj)))
|
||||
{}
|
||||
: _type(value_type::object)
|
||||
, _raw_data(std::make_unique<basic_object<string_t>>(std::move(obj)))
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>::basic_value(std::initializer_list<typename basic_object<string_t>::value_type> init_list)
|
||||
: _type(value_type::object), _raw_data(std::make_unique<basic_object<string_t>>(init_list))
|
||||
{}
|
||||
inline basic_value<string_t>::basic_value(
|
||||
std::initializer_list<typename basic_object<string_t>::value_type> init_list)
|
||||
: _type(value_type::object)
|
||||
, _raw_data(std::make_unique<basic_object<string_t>>(init_list))
|
||||
{
|
||||
}
|
||||
|
||||
// for Pimpl
|
||||
template <typename string_t>
|
||||
@@ -380,7 +563,7 @@ inline bool basic_value<string_t>::is() const noexcept
|
||||
else if constexpr (std::is_same_v<bool, value_t>) {
|
||||
return is_boolean();
|
||||
}
|
||||
else if constexpr (std::is_arithmetic_v<value_t>) {
|
||||
else if constexpr (std::is_arithmetic_v<value_t> || std::is_enum_v<value_t>) {
|
||||
return is_number();
|
||||
}
|
||||
else if constexpr (std::is_constructible_v<string_t, value_t>) {
|
||||
@@ -392,12 +575,31 @@ inline bool basic_value<string_t>::is() const noexcept
|
||||
else if constexpr (_utils::is_collection<value_t>) {
|
||||
return is_array() && all<typename value_t::value_type>();
|
||||
}
|
||||
else if constexpr (_utils::is_fixed_array<value_t>) {
|
||||
return is_array() && all<typename value_t::value_type>()
|
||||
&& as_array().size() == _utils::fixed_array_size<value_t>;
|
||||
}
|
||||
else if constexpr (std::is_same_v<basic_object<string_t>, value_t>) {
|
||||
return is_object();
|
||||
}
|
||||
else if constexpr (_utils::is_map<value_t>) {
|
||||
return is_object() && std::is_constructible_v<string_t, typename value_t::key_type> &&
|
||||
all<typename value_t::mapped_type>();
|
||||
return is_object() && std::is_constructible_v<string_t, typename value_t::key_type>
|
||||
&& all<typename value_t::mapped_type>();
|
||||
}
|
||||
else if constexpr (_utils::is_variant<value_t>) {
|
||||
return _utils::detect_variant<string_t, value_t>(
|
||||
*this,
|
||||
std::make_index_sequence<std::variant_size_v<value_t>>());
|
||||
}
|
||||
else if constexpr (_utils::is_pair<value_t>) {
|
||||
return is_array() && as_array().size() == 2
|
||||
&& at(0).template is<typename value_t::first_type>()
|
||||
&& at(1).template is<typename value_t::second_type>();
|
||||
}
|
||||
else if constexpr (_utils::is_tuple<value_t>) {
|
||||
return _utils::detect_tuple<string_t, value_t>(
|
||||
*this,
|
||||
std::make_index_sequence<std::tuple_size_v<value_t>>());
|
||||
}
|
||||
else {
|
||||
static_assert(!sizeof(value_t), "Unsupported type");
|
||||
@@ -444,33 +646,42 @@ template <typename string_t>
|
||||
template <typename... key_then_default_value_t>
|
||||
inline auto basic_value<string_t>::get(key_then_default_value_t&&... keys_then_default_value) const
|
||||
{
|
||||
return get(std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
return get(
|
||||
std::forward_as_tuple(keys_then_default_value...),
|
||||
std::make_index_sequence<sizeof...(keys_then_default_value) - 1> {});
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename... key_then_default_value_t, size_t... keys_indexes_t>
|
||||
inline auto basic_value<string_t>::get(std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
inline auto basic_value<string_t>::get(
|
||||
std::tuple<key_then_default_value_t...> keys_then_default_value,
|
||||
std::index_sequence<keys_indexes_t...>) const
|
||||
{
|
||||
constexpr unsigned long default_value_index = sizeof...(key_then_default_value_t) - 1;
|
||||
return get_helper(std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
return get_helper(
|
||||
std::get<default_value_index>(keys_then_default_value),
|
||||
std::get<keys_indexes_t>(keys_then_default_value)...);
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, typename first_key_t, typename... rest_keys_t>
|
||||
inline auto basic_value<string_t>::get_helper(const value_t& default_value, first_key_t&& first,
|
||||
rest_keys_t&&... rest) const
|
||||
inline auto basic_value<string_t>::get_helper(
|
||||
const value_t& default_value,
|
||||
first_key_t&& first,
|
||||
rest_keys_t&&... rest) const
|
||||
{
|
||||
if constexpr (std::is_constructible_v<string_t, first_key_t>) {
|
||||
return is_object() ? as_object().get_helper(default_value, std::forward<first_key_t>(first),
|
||||
std::forward<rest_keys_t>(rest)...)
|
||||
return is_object() ? as_object().get_helper(
|
||||
default_value,
|
||||
std::forward<first_key_t>(first),
|
||||
std::forward<rest_keys_t>(rest)...)
|
||||
: default_value;
|
||||
}
|
||||
else if constexpr (std::is_integral_v<std::decay_t<first_key_t>>) {
|
||||
return is_array() ? as_array().get_helper(default_value, std::forward<first_key_t>(first),
|
||||
std::forward<rest_keys_t>(rest)...)
|
||||
return is_array() ? as_array().get_helper(
|
||||
default_value,
|
||||
std::forward<first_key_t>(first),
|
||||
std::forward<rest_keys_t>(rest)...)
|
||||
: default_value;
|
||||
}
|
||||
else {
|
||||
@@ -480,16 +691,22 @@ inline auto basic_value<string_t>::get_helper(const value_t& default_value, firs
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, typename unique_key_t>
|
||||
inline auto basic_value<string_t>::get_helper(const value_t& default_value, unique_key_t&& first) const
|
||||
inline auto
|
||||
basic_value<string_t>::get_helper(const value_t& default_value, unique_key_t&& first) const
|
||||
{
|
||||
if constexpr (std::is_constructible_v<string_t, unique_key_t>) {
|
||||
return is_object() ? as_object().get_helper(default_value, std::forward<unique_key_t>(first)) : default_value;
|
||||
return is_object()
|
||||
? as_object().get_helper(default_value, std::forward<unique_key_t>(first))
|
||||
: default_value;
|
||||
}
|
||||
else if constexpr (std::is_integral_v<std::decay_t<unique_key_t>>) {
|
||||
return is_array() ? as_array().get_helper(default_value, std::forward<unique_key_t>(first)) : default_value;
|
||||
return is_array() ? as_array().get_helper(default_value, std::forward<unique_key_t>(first))
|
||||
: default_value;
|
||||
}
|
||||
else {
|
||||
static_assert(!sizeof(unique_key_t), "Parameter must be integral or string_t constructible");
|
||||
static_assert(
|
||||
!sizeof(unique_key_t),
|
||||
"Parameter must be integral or string_t constructible");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -722,10 +939,14 @@ template <typename string_t>
|
||||
template <typename... args_t>
|
||||
inline decltype(auto) basic_value<string_t>::emplace(args_t&&... args)
|
||||
{
|
||||
constexpr bool is_array_args = std::is_constructible_v<typename basic_array<string_t>::value_type, args_t...>;
|
||||
constexpr bool is_object_args = std::is_constructible_v<typename basic_object<string_t>::value_type, args_t...>;
|
||||
constexpr bool is_array_args =
|
||||
std::is_constructible_v<typename basic_array<string_t>::value_type, args_t...>;
|
||||
constexpr bool is_object_args =
|
||||
std::is_constructible_v<typename basic_object<string_t>::value_type, args_t...>;
|
||||
|
||||
static_assert(is_array_args || is_object_args, "Args can not constructure a array or object value");
|
||||
static_assert(
|
||||
is_array_args || is_object_args,
|
||||
"Args can not constructure a array or object value");
|
||||
|
||||
if constexpr (is_array_args) {
|
||||
return as_array().emplace_back(std::forward<args_t>(args)...);
|
||||
@@ -801,6 +1022,13 @@ inline collection_t<value_t> basic_value<string_t>::as_collection() const
|
||||
return as_array().template as_collection<value_t, collection_t>();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, size_t Size, template <typename, size_t> typename fixed_array_t>
|
||||
inline fixed_array_t<value_t, Size> basic_value<string_t>::as_fixed_array() const
|
||||
{
|
||||
return as_array().template as_fixed_array<value_t, Size>();
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
template <typename value_t, template <typename...> typename map_t>
|
||||
inline map_t<string_t, value_t> basic_value<string_t>::as_map() const
|
||||
@@ -818,12 +1046,15 @@ inline basic_value<string_t>& basic_value<string_t>::operator=(const basic_value
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t>& basic_value<string_t>::operator=(basic_value<string_t>&& rhs) noexcept = default;
|
||||
inline basic_value<string_t>&
|
||||
basic_value<string_t>::operator=(basic_value<string_t>&& rhs) noexcept = default;
|
||||
|
||||
template <typename string_t>
|
||||
inline bool basic_value<string_t>::operator==(const basic_value<string_t>& rhs) const
|
||||
{
|
||||
if (_type != rhs._type) return false;
|
||||
if (_type != rhs._type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (_type) {
|
||||
case value_type::null:
|
||||
@@ -878,7 +1109,8 @@ inline basic_value<string_t>& basic_value<string_t>::operator[](string_t&& key)
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t> basic_value<string_t>::operator|(const basic_object<string_t>& rhs) const&
|
||||
inline basic_value<string_t>
|
||||
basic_value<string_t>::operator|(const basic_object<string_t>& rhs) const&
|
||||
{
|
||||
return as_object() | rhs;
|
||||
}
|
||||
@@ -916,7 +1148,8 @@ inline basic_value<string_t>& basic_value<string_t>::operator|=(basic_object<str
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline basic_value<string_t> basic_value<string_t>::operator+(const basic_array<string_t>& rhs) const&
|
||||
inline basic_value<string_t>
|
||||
basic_value<string_t>::operator+(const basic_array<string_t>& rhs) const&
|
||||
{
|
||||
return as_array() + rhs;
|
||||
}
|
||||
@@ -956,9 +1189,12 @@ inline basic_value<string_t>& basic_value<string_t>::operator+=(basic_array<stri
|
||||
template <typename string_t>
|
||||
template <typename... args_t>
|
||||
inline basic_value<string_t>::basic_value(value_type type, args_t&&... args)
|
||||
: _type(type), _raw_data(std::forward<args_t>(args)...)
|
||||
: _type(type)
|
||||
, _raw_data(std::forward<args_t>(args)...)
|
||||
{
|
||||
static_assert(std::is_constructible_v<var_t, args_t...>, "Parameter can't be used to construct a var_t");
|
||||
static_assert(
|
||||
std::is_constructible_v<var_t, args_t...>,
|
||||
"Parameter can't be used to construct a var_t");
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
@@ -981,11 +1217,14 @@ inline typename basic_value<string_t>::var_t basic_value<string_t>::deep_copy(co
|
||||
return dst;
|
||||
}
|
||||
|
||||
template <typename ostream_t, typename string_t,
|
||||
typename std_ostream_t =
|
||||
std::basic_ostream<typename string_t::value_type, std::char_traits<typename string_t::value_type>>,
|
||||
typename =
|
||||
std::enable_if_t<std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
template <
|
||||
typename ostream_t,
|
||||
typename string_t,
|
||||
typename std_ostream_t = std::basic_ostream<
|
||||
typename string_t::value_type,
|
||||
std::char_traits<typename string_t::value_type>>,
|
||||
typename = std::enable_if_t<
|
||||
std::is_same_v<std_ostream_t, ostream_t> || std::is_base_of_v<std_ostream_t, ostream_t>>>
|
||||
ostream_t& operator<<(ostream_t& out, const basic_value<string_t>& val)
|
||||
{
|
||||
out << val.format();
|
||||
|
||||
4
3rdparty/include/meojson/json.hpp
vendored
4
3rdparty/include/meojson/json.hpp
vendored
@@ -1,6 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
|
||||
#include "common/serialization.hpp"
|
||||
#include "common/types.hpp"
|
||||
#include "parser/parser.hpp"
|
||||
#include "reflection/jsonization.hpp"
|
||||
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
6
3rdparty/include/meojson/json5.hpp
vendored
6
3rdparty/include/meojson/json5.hpp
vendored
@@ -1,4 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
// IWYU pragma: begin_exports
|
||||
|
||||
#include "common/types.hpp"
|
||||
#include "parser5/parser5.hpp"
|
||||
#include "parser5/parser5.hpp"
|
||||
|
||||
// IWYU pragma: end_exports
|
||||
|
||||
37
3rdparty/include/meojson/parser/bitops.hpp
vendored
37
3rdparty/include/meojson/parser/bitops.hpp
vendored
@@ -1,13 +1,17 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#if __cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
|
||||
#include <bit>
|
||||
|
||||
namespace json::_bitops
|
||||
{
|
||||
using std::countl_one;
|
||||
using std::countl_zero;
|
||||
using std::countr_one;
|
||||
using std::countr_zero;
|
||||
|
||||
inline constexpr bool is_little_endian()
|
||||
{
|
||||
return std::endian::native == std::endian::little;
|
||||
@@ -15,25 +19,37 @@ inline constexpr bool is_little_endian()
|
||||
}
|
||||
#else
|
||||
#include <cstdint>
|
||||
|
||||
namespace json::_bitops
|
||||
{
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
inline constexpr int countl_zero(uint32_t x)
|
||||
{
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) return x == 0 ? 32 : __builtin_clz(x);
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) return x == 0 ? 32 : __builtin_clzl(x);
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) {
|
||||
return x == 0 ? 32 : __builtin_clz(x);
|
||||
}
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) {
|
||||
return x == 0 ? 32 : __builtin_clzl(x);
|
||||
}
|
||||
return x == 0 ? 32 : __builtin_clzll(x);
|
||||
}
|
||||
|
||||
inline constexpr int countr_zero(uint32_t x)
|
||||
{
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) return x == 0 ? 32 : __builtin_ctz(x);
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) return x == 0 ? 32 : __builtin_ctzl(x);
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned int)) {
|
||||
return x == 0 ? 32 : __builtin_ctz(x);
|
||||
}
|
||||
if constexpr (sizeof(uint32_t) == sizeof(unsigned long)) {
|
||||
return x == 0 ? 32 : __builtin_ctzl(x);
|
||||
}
|
||||
return x == 0 ? 32 : __builtin_ctzll(x);
|
||||
}
|
||||
|
||||
inline constexpr int countl_zero(uint64_t x)
|
||||
{
|
||||
return x == 0 ? 64 : __builtin_clzll(x);
|
||||
}
|
||||
|
||||
inline constexpr int countr_zero(uint64_t x)
|
||||
{
|
||||
return x == 0 ? 64 : __builtin_ctzll(x);
|
||||
@@ -45,14 +61,17 @@ inline int countl_zero(uint32_t x)
|
||||
{
|
||||
return __lzcnt(x);
|
||||
}
|
||||
|
||||
inline int countr_zero(uint32_t x)
|
||||
{
|
||||
return _tzcnt_u32(x);
|
||||
}
|
||||
|
||||
inline int countl_zero(uint64_t x)
|
||||
{
|
||||
return (int)__lzcnt64(x);
|
||||
}
|
||||
|
||||
inline int countr_zero(uint64_t x)
|
||||
{
|
||||
return (int)_tzcnt_u64(x);
|
||||
@@ -63,16 +82,19 @@ inline constexpr int countl_zero(uint32_t x)
|
||||
unsigned long index = 0;
|
||||
return _BitScanReverse(&index, x) ? 31 - index : 32;
|
||||
}
|
||||
|
||||
inline constexpr int countr_zero(uint32_t x)
|
||||
{
|
||||
unsigned long index = 0;
|
||||
return _BitScanForward(&index, x) ? index : 32;
|
||||
}
|
||||
|
||||
inline constexpr int countl_zero(uint64_t x)
|
||||
{
|
||||
unsigned long index = 0;
|
||||
return _BitScanReverse64(&index, x) ? 63 - index : 64;
|
||||
}
|
||||
|
||||
inline constexpr int countr_zero(uint64_t x)
|
||||
{
|
||||
unsigned long index = 0;
|
||||
@@ -86,14 +108,17 @@ inline int countl_one(uint32_t x)
|
||||
{
|
||||
return countl_zero(~x);
|
||||
}
|
||||
|
||||
inline int countr_one(uint32_t x)
|
||||
{
|
||||
return countr_zero(~x);
|
||||
}
|
||||
|
||||
inline int countl_one(uint64_t x)
|
||||
{
|
||||
return countl_zero(~x);
|
||||
}
|
||||
|
||||
inline int countr_one(uint64_t x)
|
||||
{
|
||||
return countr_zero(~x);
|
||||
@@ -102,10 +127,12 @@ inline int countr_one(uint64_t x)
|
||||
// no constexpr endian awareness before C++20
|
||||
inline bool is_little_endian()
|
||||
{
|
||||
union {
|
||||
union
|
||||
{
|
||||
uint32_t u32;
|
||||
uint8_t u8;
|
||||
} u = { 0x01020304 };
|
||||
|
||||
return u.u8 == 4;
|
||||
}
|
||||
} // namespace json::_bitops
|
||||
|
||||
42
3rdparty/include/meojson/parser/packed_bytes.hpp
vendored
42
3rdparty/include/meojson/parser/packed_bytes.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
@@ -28,11 +30,13 @@ struct packed_bytes
|
||||
};
|
||||
}
|
||||
|
||||
#ifndef MEOJSON_DISABLE_PACKED_BYTES
|
||||
#if defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP)
|
||||
#include "packed_bytes_x86.hpp"
|
||||
#elif defined(__ARM_NEON) || defined(_M_ARM) || defined(_M_ARM64)
|
||||
#include "packed_bytes_arm.hpp"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace json::_packed_bytes
|
||||
{
|
||||
@@ -66,14 +70,19 @@ struct packed_bytes_trait_uint64
|
||||
return is_zero_memberwise((x) ^ (UINT64_C(0x0101010101010101) * (n)));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b) { return a | b; }
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return a | b;
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
|
||||
{
|
||||
if (_bitops::is_little_endian())
|
||||
if (_bitops::is_little_endian()) {
|
||||
return _bitops::countr_zero(x) / 8;
|
||||
else
|
||||
}
|
||||
else {
|
||||
return _bitops::countl_zero(x) / 8;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,16 +117,22 @@ struct packed_bytes_trait_uint32
|
||||
return is_zero_memberwise((x) ^ (~UINT32_C(0) / 255 * (n)));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b) { return a | b; }
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return a | b;
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
|
||||
{
|
||||
if (_bitops::is_little_endian())
|
||||
if (_bitops::is_little_endian()) {
|
||||
return _bitops::countr_zero(x) / 8;
|
||||
else
|
||||
}
|
||||
else {
|
||||
return _bitops::countl_zero(x) / 8;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct packed_bytes<8>
|
||||
{
|
||||
@@ -133,9 +148,14 @@ struct packed_bytes<4>
|
||||
template <size_t N>
|
||||
using packed_bytes_trait = typename packed_bytes<N>::traits;
|
||||
|
||||
using packed_bytes_trait_max =
|
||||
std::conditional_t<packed_bytes_trait<32>::available, packed_bytes_trait<32>,
|
||||
std::conditional_t<packed_bytes_trait<16>::available, packed_bytes_trait<16>,
|
||||
std::conditional_t<packed_bytes_trait<8>::available, packed_bytes_trait<8>,
|
||||
packed_bytes_trait<4>>>>;
|
||||
using packed_bytes_trait_max = std::conditional_t<
|
||||
packed_bytes_trait<32>::available,
|
||||
packed_bytes_trait<32>,
|
||||
std::conditional_t<
|
||||
packed_bytes_trait<16>::available,
|
||||
packed_bytes_trait<16>,
|
||||
std::conditional_t<
|
||||
packed_bytes_trait<8>::available,
|
||||
packed_bytes_trait<8>,
|
||||
packed_bytes_trait<4>>>>;
|
||||
} // namespace json::_packed_bytes
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
// current NEON implementation doesn't outperform 64-bit scalar implementation
|
||||
@@ -17,7 +19,10 @@ struct packed_bytes_trait_neon
|
||||
static constexpr auto step = 16;
|
||||
using value_type = uint8x16_t;
|
||||
|
||||
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr) { return vld1q_u8((uint8_t*)ptr); }
|
||||
__packed_bytes_strong_inline static value_type load_unaligned(const void* ptr)
|
||||
{
|
||||
return vld1q_u8((uint8_t*)ptr);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type less(value_type x, uint8_t n)
|
||||
{
|
||||
@@ -26,19 +31,31 @@ struct packed_bytes_trait_neon
|
||||
return is_less;
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n) { return vceqq_u8(x, vdupq_n_u8(n)); }
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, uint8_t n)
|
||||
{
|
||||
return vceqq_u8(x, vdupq_n_u8(n));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y) { return vceqq_u8(x, y); }
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
|
||||
{
|
||||
return vceqq_u8(x, y);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b) { return vorrq_u8(a, b); }
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return vorrq_u8(a, b);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
|
||||
{
|
||||
#ifdef __packed_bytes_trait_arm64
|
||||
return vmaxvq_u8(x) == 0;
|
||||
#else
|
||||
auto fold64 = vorr_u64(vget_high_u64(vreinterpretq_u8_u64(x), 0), vget_low_u64(vreinterpretq_u8_u64(x), 1));
|
||||
auto fold32 = vget_lane_u32(vreinterpret_u64_u32(fold64), 0) | vget_lane_u32(vreinterpret_u64_u32(fold64), 1);
|
||||
auto fold64 = vorr_u64(
|
||||
vget_high_u64(vreinterpretq_u8_u64(x), 0),
|
||||
vget_low_u64(vreinterpretq_u8_u64(x), 1));
|
||||
auto fold32 = vget_lane_u32(vreinterpret_u64_u32(fold64), 0)
|
||||
| vget_lane_u32(vreinterpret_u64_u32(fold64), 1);
|
||||
return fold32 == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "packed_bytes.hpp"
|
||||
|
||||
#include <emmintrin.h>
|
||||
@@ -35,9 +38,15 @@ struct packed_bytes_trait_sse
|
||||
return _mm_cmpeq_epi8(x, _mm_set1_epi8(static_cast<char>(n)));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y) { return _mm_cmpeq_epi8(x, y); }
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
|
||||
{
|
||||
return _mm_cmpeq_epi8(x, y);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b) { return _mm_or_si128(a, b); }
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return _mm_or_si128(a, b);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
|
||||
{
|
||||
@@ -97,14 +106,20 @@ struct packed_bytes_trait_avx2
|
||||
return _mm256_cmpeq_epi8(x, _mm256_set1_epi8(static_cast<char>(n)));
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y) { return _mm256_cmpeq_epi8(x, y); }
|
||||
__packed_bytes_strong_inline static value_type equal(value_type x, value_type y)
|
||||
{
|
||||
return _mm256_cmpeq_epi8(x, y);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static value_type bitwise_or(value_type a, value_type b)
|
||||
{
|
||||
return _mm256_or_si256(a, b);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static bool is_all_zero(value_type x) { return (bool)_mm256_testz_si256(x, x); }
|
||||
__packed_bytes_strong_inline static bool is_all_zero(value_type x)
|
||||
{
|
||||
return (bool)_mm256_testz_si256(x, x);
|
||||
}
|
||||
|
||||
__packed_bytes_strong_inline static size_t first_nonzero_byte(value_type x)
|
||||
{
|
||||
|
||||
256
3rdparty/include/meojson/parser/parser.hpp
vendored
256
3rdparty/include/meojson/parser/parser.hpp
vendored
@@ -1,5 +1,8 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cctype>
|
||||
#include <fstream>
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
@@ -15,8 +18,10 @@ namespace json
|
||||
// * parser declare *
|
||||
// ****************************
|
||||
|
||||
template <typename string_t = default_string_t, typename parsing_t = void,
|
||||
typename accel_traits = _packed_bytes::packed_bytes_trait_max>
|
||||
template <
|
||||
typename string_t = default_string_t,
|
||||
typename parsing_t = void,
|
||||
typename accel_traits = _packed_bytes::packed_bytes_trait_max>
|
||||
class parser
|
||||
{
|
||||
public:
|
||||
@@ -28,7 +33,12 @@ public:
|
||||
static std::optional<basic_value<string_t>> parse(const parsing_t& content);
|
||||
|
||||
private:
|
||||
parser(parsing_iter_t cbegin, parsing_iter_t cend) noexcept : _cur(cbegin), _end(cend) { ; }
|
||||
parser(parsing_iter_t cbegin, parsing_iter_t cend) noexcept
|
||||
: _cur(cbegin)
|
||||
, _end(cend)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
std::optional<basic_value<string_t>> parse();
|
||||
basic_value<string_t> parse_value();
|
||||
@@ -47,6 +57,7 @@ private:
|
||||
bool skip_string_literal_with_accel();
|
||||
bool skip_whitespace() noexcept;
|
||||
bool skip_digit();
|
||||
bool skip_unicode_escape(uint16_t& pair_high, string_t& result);
|
||||
|
||||
private:
|
||||
parsing_iter_t _cur;
|
||||
@@ -63,8 +74,10 @@ auto parse(const parsing_t& content);
|
||||
template <typename char_t>
|
||||
auto parse(char_t* content);
|
||||
|
||||
template <typename istream_t,
|
||||
typename = std::enable_if_t<std::is_base_of_v<std::basic_istream<typename istream_t::char_type>, istream_t>>>
|
||||
template <
|
||||
typename istream_t,
|
||||
typename = std::enable_if_t<
|
||||
std::is_base_of_v<std::basic_istream<typename istream_t::char_type>, istream_t>>>
|
||||
auto parse(istream_t& istream, bool check_bom);
|
||||
|
||||
template <typename ifstream_t = std::ifstream, typename path_t = void>
|
||||
@@ -72,17 +85,17 @@ auto open(const path_t& path, bool check_bom = false);
|
||||
|
||||
namespace literals
|
||||
{
|
||||
value operator""_json(const char* str, size_t len);
|
||||
wvalue operator""_json(const wchar_t* str, size_t len);
|
||||
value operator""_json(const char* str, size_t len);
|
||||
wvalue operator""_json(const wchar_t* str, size_t len);
|
||||
|
||||
value operator""_jvalue(const char* str, size_t len);
|
||||
wvalue operator""_jvalue(const wchar_t* str, size_t len);
|
||||
value operator""_jvalue(const char* str, size_t len);
|
||||
wvalue operator""_jvalue(const wchar_t* str, size_t len);
|
||||
|
||||
array operator""_jarray(const char* str, size_t len);
|
||||
warray operator""_jarray(const wchar_t* str, size_t len);
|
||||
array operator""_jarray(const char* str, size_t len);
|
||||
warray operator""_jarray(const wchar_t* str, size_t len);
|
||||
|
||||
object operator""_jobject(const char* str, size_t len);
|
||||
wobject operator""_jobject(const wchar_t* str, size_t len);
|
||||
object operator""_jobject(const char* str, size_t len);
|
||||
wobject operator""_jobject(const wchar_t* str, size_t len);
|
||||
}
|
||||
|
||||
template <typename string_t = default_string_t>
|
||||
@@ -93,7 +106,8 @@ const basic_value<string_t> invalid_value();
|
||||
// *************************
|
||||
|
||||
template <typename string_t, typename parsing_t, typename accel_traits>
|
||||
inline std::optional<basic_value<string_t>> parser<string_t, parsing_t, accel_traits>::parse(const parsing_t& content)
|
||||
inline std::optional<basic_value<string_t>>
|
||||
parser<string_t, parsing_t, accel_traits>::parse(const parsing_t& content)
|
||||
{
|
||||
return parser<string_t, parsing_t, accel_traits>(content.cbegin(), content.cend()).parse();
|
||||
}
|
||||
@@ -252,7 +266,9 @@ inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_st
|
||||
if (!string_opt) {
|
||||
return invalid_value<string_t>();
|
||||
}
|
||||
return basic_value<string_t>(basic_value<string_t>::value_type::string, std::move(string_opt).value());
|
||||
return basic_value<string_t>(
|
||||
basic_value<string_t>::value_type::string,
|
||||
std::move(string_opt).value());
|
||||
}
|
||||
|
||||
template <typename string_t, typename parsing_t, typename accel_traits>
|
||||
@@ -350,7 +366,10 @@ inline basic_value<string_t> parser<string_t, parsing_t, accel_traits>::parse_ob
|
||||
return invalid_value<string_t>();
|
||||
}
|
||||
|
||||
result.emplace(std::move(*key_opt), std::move(val));
|
||||
auto emplaced = result.emplace(std::move(*key_opt), std::move(val)).second;
|
||||
if (!emplaced) {
|
||||
return invalid_value<string_t>();
|
||||
}
|
||||
|
||||
if (*_cur == ',') {
|
||||
++_cur;
|
||||
@@ -382,6 +401,7 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
|
||||
string_t result;
|
||||
auto no_escape_beg = _cur;
|
||||
uint16_t pair_high = 0;
|
||||
|
||||
while (_cur != _end) {
|
||||
if constexpr (sizeof(*_cur) == 1 && accel_traits::available) {
|
||||
@@ -399,6 +419,9 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
if (_cur == _end) {
|
||||
return std::nullopt;
|
||||
}
|
||||
if (pair_high && *_cur != 'u') {
|
||||
return std::nullopt;
|
||||
}
|
||||
switch (*_cur) {
|
||||
case '"':
|
||||
result.push_back('"');
|
||||
@@ -424,9 +447,11 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
case 't':
|
||||
result.push_back('\t');
|
||||
break;
|
||||
// case 'u':
|
||||
// result.push_back('\u');
|
||||
// break;
|
||||
case 'u':
|
||||
if (!skip_unicode_escape(pair_high, result)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// Illegal backslash escape
|
||||
return std::nullopt;
|
||||
@@ -435,10 +460,16 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
break;
|
||||
}
|
||||
case '"': {
|
||||
if (pair_high) {
|
||||
return std::nullopt;
|
||||
}
|
||||
result += string_t(no_escape_beg, _cur++);
|
||||
return result;
|
||||
}
|
||||
default:
|
||||
if (pair_high) {
|
||||
return std::nullopt;
|
||||
}
|
||||
++_cur;
|
||||
break;
|
||||
}
|
||||
@@ -446,6 +477,103 @@ inline std::optional<string_t> parser<string_t, parsing_t, accel_traits>::parse_
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
template <typename string_t, typename parsing_t, typename accel_traits>
|
||||
inline bool parser<string_t, parsing_t, accel_traits>::skip_unicode_escape(
|
||||
uint16_t& pair_high,
|
||||
string_t& result)
|
||||
{
|
||||
uint16_t cp = 0;
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (++_cur == _end) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!std::isxdigit(static_cast<unsigned char>(*_cur))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
cp <<= 4;
|
||||
|
||||
if ('0' <= *_cur && *_cur <= '9') {
|
||||
cp |= *_cur - '0';
|
||||
}
|
||||
else if ('a' <= *_cur && *_cur <= 'f') {
|
||||
cp |= *_cur - 'a' + 10;
|
||||
}
|
||||
else if ('A' <= *_cur && *_cur <= 'F') {
|
||||
cp |= *_cur - 'A' + 10;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ext_cp = cp;
|
||||
uint16_t hi_cp = 0, lo_cp = 0;
|
||||
|
||||
if (0xD800 <= cp && cp <= 0xDBFF) {
|
||||
if (pair_high) {
|
||||
return false;
|
||||
}
|
||||
pair_high = cp;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (0xDC00 <= cp && cp <= 0xDFFF) {
|
||||
if (!pair_high) {
|
||||
return false;
|
||||
}
|
||||
ext_cp = (((pair_high - 0xD800) << 10) | (cp - 0xDC00)) + 0x10000;
|
||||
hi_cp = pair_high;
|
||||
lo_cp = cp;
|
||||
pair_high = 0;
|
||||
}
|
||||
|
||||
if constexpr (std::is_same_v<typename string_t::value_type, char>) {
|
||||
// utf8
|
||||
if (ext_cp <= 0x7F) {
|
||||
result.push_back(static_cast<char>(ext_cp));
|
||||
}
|
||||
else if (ext_cp <= 0x7FF) {
|
||||
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00011111) | 0b11000000u));
|
||||
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
|
||||
}
|
||||
else if (ext_cp <= 0xFFFF) {
|
||||
result.push_back(static_cast<char>(((ext_cp >> 12) & 0b00001111) | 0b11100000u));
|
||||
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00111111) | 0b10000000u));
|
||||
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
|
||||
}
|
||||
else {
|
||||
result.push_back(static_cast<char>(((ext_cp >> 18) & 0b00000111) | 0b11110000u));
|
||||
result.push_back(static_cast<char>(((ext_cp >> 12) & 0b00111111) | 0b10000000u));
|
||||
result.push_back(static_cast<char>(((ext_cp >> 6) & 0b00111111) | 0b10000000u));
|
||||
result.push_back(static_cast<char>((ext_cp & 0b00111111) | 0b10000000u));
|
||||
}
|
||||
}
|
||||
else if constexpr (std::is_same_v<typename string_t::value_type, wchar_t>) {
|
||||
if constexpr (sizeof(wchar_t) == 4) {
|
||||
result.push_back(static_cast<wchar_t>(ext_cp));
|
||||
}
|
||||
else if constexpr (sizeof(wchar_t) == 2) {
|
||||
if (ext_cp <= 0xFFFF) {
|
||||
result.push_back(static_cast<wchar_t>(ext_cp));
|
||||
}
|
||||
else {
|
||||
result.push_back(static_cast<wchar_t>(hi_cp));
|
||||
result.push_back(static_cast<wchar_t>(lo_cp));
|
||||
}
|
||||
}
|
||||
else {
|
||||
static_assert(!sizeof(typename string_t::value_type), "Unsupported wchar");
|
||||
}
|
||||
}
|
||||
else {
|
||||
static_assert(!sizeof(typename string_t::value_type), "Unsupported type");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename string_t, typename parsing_t, typename accel_traits>
|
||||
inline bool parser<string_t, parsing_t, accel_traits>::skip_string_literal_with_accel()
|
||||
{
|
||||
@@ -456,8 +584,10 @@ inline bool parser<string_t, parsing_t, accel_traits>::skip_string_literal_with_
|
||||
while (_end - _cur >= accel_traits::step) {
|
||||
auto pack = accel_traits::load_unaligned(&(*_cur));
|
||||
auto result = accel_traits::less(pack, 32);
|
||||
result = accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('"')));
|
||||
result = accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('\\')));
|
||||
result =
|
||||
accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('"')));
|
||||
result =
|
||||
accel_traits::bitwise_or(result, accel_traits::equal(pack, static_cast<uint8_t>('\\')));
|
||||
|
||||
if (accel_traits::is_all_zero(result)) {
|
||||
_cur += accel_traits::step;
|
||||
@@ -551,8 +681,8 @@ auto parse(istream_t& ifs, bool check_bom)
|
||||
static constexpr uchar Bom_1 = 0xBB;
|
||||
static constexpr uchar Bom_2 = 0xBF;
|
||||
|
||||
if (str.size() >= 3 && static_cast<uchar>(str.at(0)) == Bom_0 && static_cast<uchar>(str.at(1)) == Bom_1 &&
|
||||
static_cast<uchar>(str.at(2)) == Bom_2) {
|
||||
if (str.size() >= 3 && static_cast<uchar>(str.at(0)) == Bom_0
|
||||
&& static_cast<uchar>(str.at(1)) == Bom_1 && static_cast<uchar>(str.at(2)) == Bom_2) {
|
||||
str.assign(str.begin() + 3, str.end());
|
||||
}
|
||||
}
|
||||
@@ -578,50 +708,56 @@ auto open(const path_t& filepath, bool check_bom)
|
||||
|
||||
namespace literals
|
||||
{
|
||||
inline value operator""_json(const char* str, size_t len)
|
||||
{
|
||||
return operator""_jvalue(str, len);
|
||||
}
|
||||
inline wvalue operator""_json(const wchar_t* str, size_t len)
|
||||
{
|
||||
return operator""_jvalue(str, len);
|
||||
}
|
||||
inline value operator""_json(const char* str, size_t len)
|
||||
{
|
||||
return operator""_jvalue(str, len);
|
||||
}
|
||||
|
||||
inline value operator""_jvalue(const char* str, size_t len)
|
||||
{
|
||||
return parse(std::string_view(str, len)).value_or(value());
|
||||
}
|
||||
inline wvalue operator""_jvalue(const wchar_t* str, size_t len)
|
||||
{
|
||||
return parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
}
|
||||
inline wvalue operator""_json(const wchar_t* str, size_t len)
|
||||
{
|
||||
return operator""_jvalue(str, len);
|
||||
}
|
||||
|
||||
inline array operator""_jarray(const char* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::string_view(str, len)).value_or(value());
|
||||
return val.is_array() ? val.as_array() : array();
|
||||
}
|
||||
inline warray operator""_jarray(const wchar_t* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
return val.is_array() ? val.as_array() : warray();
|
||||
}
|
||||
inline value operator""_jvalue(const char* str, size_t len)
|
||||
{
|
||||
return parse(std::string_view(str, len)).value_or(value());
|
||||
}
|
||||
|
||||
inline object operator""_jobject(const char* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::string_view(str, len)).value_or(value());
|
||||
return val.is_object() ? val.as_object() : object();
|
||||
}
|
||||
inline wobject operator""_jobject(const wchar_t* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
return val.is_object() ? val.as_object() : wobject();
|
||||
}
|
||||
inline wvalue operator""_jvalue(const wchar_t* str, size_t len)
|
||||
{
|
||||
return parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
}
|
||||
|
||||
inline array operator""_jarray(const char* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::string_view(str, len)).value_or(value());
|
||||
return val.is_array() ? val.as_array() : array();
|
||||
}
|
||||
|
||||
inline warray operator""_jarray(const wchar_t* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
return val.is_array() ? val.as_array() : warray();
|
||||
}
|
||||
|
||||
inline object operator""_jobject(const char* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::string_view(str, len)).value_or(value());
|
||||
return val.is_object() ? val.as_object() : object();
|
||||
}
|
||||
|
||||
inline wobject operator""_jobject(const wchar_t* str, size_t len)
|
||||
{
|
||||
auto val = parse(std::wstring_view(str, len)).value_or(wvalue());
|
||||
return val.is_object() ? val.as_object() : wobject();
|
||||
}
|
||||
} // namespace literals
|
||||
|
||||
template <typename string_t>
|
||||
const basic_value<string_t> invalid_value()
|
||||
{
|
||||
return basic_value<string_t>(basic_value<string_t>::value_type::invalid, typename basic_value<string_t>::var_t());
|
||||
return basic_value<string_t>(
|
||||
basic_value<string_t>::value_type::invalid,
|
||||
typename basic_value<string_t>::var_t());
|
||||
}
|
||||
} // namespace json
|
||||
|
||||
103
3rdparty/include/meojson/parser5/parser5.hpp
vendored
103
3rdparty/include/meojson/parser5/parser5.hpp
vendored
@@ -1,10 +1,11 @@
|
||||
// IWYU pragma: private, include <meojson/json5.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <iomanip>
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <vector>
|
||||
@@ -31,6 +32,7 @@ public:
|
||||
{
|
||||
public:
|
||||
exception() = default;
|
||||
|
||||
exception(const std::string& type, const std::string& msg, const std::string& detail)
|
||||
{
|
||||
std::stringstream ss;
|
||||
@@ -38,6 +40,7 @@ public:
|
||||
ss << detail << std::endl;
|
||||
_what = ss.str();
|
||||
}
|
||||
|
||||
exception(const exception&) = default;
|
||||
exception& operator=(const exception&) = default;
|
||||
exception(exception&&) = default;
|
||||
@@ -50,8 +53,12 @@ public:
|
||||
{
|
||||
public:
|
||||
InvalidChar(u8char ch = 0, const std::string& detail = "")
|
||||
: exception("Invalid Char", "Unexpected token \'" + StringFromCharCode(ch) + "\'", detail)
|
||||
{}
|
||||
: exception(
|
||||
"Invalid Char",
|
||||
"Unexpected token \'" + StringFromCharCode(ch) + "\'",
|
||||
detail)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class InvalidIdentifier : public exception
|
||||
@@ -59,14 +66,17 @@ public:
|
||||
public:
|
||||
InvalidIdentifier(const std::string& msg = "", const std::string& detail = "")
|
||||
: exception("Invalid Identifier", msg, detail)
|
||||
{}
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class InvalidEOF : public exception
|
||||
{
|
||||
public:
|
||||
InvalidEOF(const std::string& msg = "", const std::string& detail = "") : exception("Invalid EOF", msg, detail)
|
||||
{}
|
||||
InvalidEOF(const std::string& msg = "", const std::string& detail = "")
|
||||
: exception("Invalid EOF", msg, detail)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -175,7 +185,13 @@ public:
|
||||
static std::optional<value> parse(const string_t& content, std::string* error = nullptr);
|
||||
|
||||
private:
|
||||
parser5(string_iter_t cbegin, string_iter_t cend) noexcept : _cur(cbegin), _end(cend), _line_begin_cur(cbegin) {}
|
||||
parser5(string_iter_t cbegin, string_iter_t cend) noexcept
|
||||
: _cur(cbegin)
|
||||
, _end(cend)
|
||||
, _line_begin_cur(cbegin)
|
||||
{
|
||||
}
|
||||
|
||||
std::optional<value> parse();
|
||||
|
||||
private:
|
||||
@@ -272,62 +288,68 @@ inline bool parser5<string_t>::unicode::isSpaceSeparator(u8char ch)
|
||||
template <typename string_t>
|
||||
inline bool parser5<string_t>::unicode::isIdStartChar(u8char ch)
|
||||
{
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '$') || (ch == '_') ||
|
||||
findInRange(json::unicode::id_start, toUnicode(ch));
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '$') || (ch == '_')
|
||||
|| findInRange(json::unicode::id_start, toUnicode(ch));
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline bool parser5<string_t>::unicode::isIdContinueChar(u8char ch)
|
||||
{
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || (ch == '$') ||
|
||||
(ch == '_') || findInRange(json::unicode::id_continue, toUnicode(ch));
|
||||
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9')
|
||||
|| (ch == '$') || (ch == '_') || findInRange(json::unicode::id_continue, toUnicode(ch));
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline bool parser5<string_t>::unicode::isDigit(u8char ch)
|
||||
{
|
||||
auto str = StringFromCharCode(ch);
|
||||
return std::regex_search(str, std::regex(R"([0-9])"));
|
||||
return (ch >= '0' && ch <= '9');
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline bool parser5<string_t>::unicode::isHexDigit(u8char ch)
|
||||
{
|
||||
auto str = StringFromCharCode(ch);
|
||||
return std::regex_search(str, std::regex(R"([0-9A-Fa-f])"));
|
||||
return (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 'F') || (ch >= '0' && ch <= '9');
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline uint64_t parser5<string_t>::unicode::toUnicode(u8char ch)
|
||||
{
|
||||
std::stack<uint8_t> coded;
|
||||
if (ch == 0) {
|
||||
return ch;
|
||||
}
|
||||
|
||||
std::stack<uint8_t> coded;
|
||||
while (ch > 0) {
|
||||
coded.push(ch & 0xff);
|
||||
ch = ch >> 8;
|
||||
ch >>= 8;
|
||||
}
|
||||
|
||||
u8char charcode = 0;
|
||||
uint8_t t = coded.top();
|
||||
coded.pop();
|
||||
if (t < 128) {
|
||||
return t;
|
||||
}
|
||||
uint8_t high_bit_mask = (1 << 6) - 1;
|
||||
|
||||
uint8_t high_bit_mask = 0b00111111;
|
||||
uint8_t high_bit_shift = 0;
|
||||
int total_bits = 0;
|
||||
const int other_bits = 6;
|
||||
|
||||
while ((t & 0xC0) == 0xC0) {
|
||||
t <<= 1;
|
||||
t &= 0xff;
|
||||
total_bits += 6;
|
||||
total_bits += other_bits;
|
||||
high_bit_mask >>= 1;
|
||||
high_bit_shift++;
|
||||
charcode <<= other_bits;
|
||||
charcode |= coded.top() & ((1 << other_bits) - 1);
|
||||
coded.pop();
|
||||
|
||||
if (!coded.empty()) {
|
||||
charcode <<= other_bits;
|
||||
charcode |= coded.top() & ((1 << other_bits) - 1);
|
||||
coded.pop();
|
||||
}
|
||||
}
|
||||
|
||||
charcode |= static_cast<uint64_t>((t >> high_bit_shift) & high_bit_mask) << total_bits;
|
||||
return charcode;
|
||||
}
|
||||
@@ -346,7 +368,8 @@ inline bool parser5<string_t>::unicode::findInRange(const array_t& range, u8char
|
||||
return false;
|
||||
}
|
||||
// set 中保存的是类似于 { start1, end1, start2, end2, ... } 的形式, 区间可表示为[start, end)
|
||||
// 判断lb是否位于start的位置, 如果是, 则表示codePoint在某个区间的内部, 如果不是, 则表示codePoint在两个区间中间
|
||||
// 判断lb是否位于start的位置, 如果是, 则表示codePoint在某个区间的内部, 如果不是,
|
||||
// 则表示codePoint在两个区间中间
|
||||
return std::distance(begin, lb) % 2 == 0;
|
||||
}
|
||||
|
||||
@@ -519,11 +542,13 @@ inline typename parser5<string_t>::u8char parser5<string_t>::unicodeEscape()
|
||||
|
||||
/* utf-8 reader */
|
||||
template <typename string_t>
|
||||
inline typename parser5<string_t>::u8char parser5<string_t>::peek(const string_iter_t& begin, const string_iter_t& end,
|
||||
size_t* plen)
|
||||
inline typename parser5<string_t>::u8char
|
||||
parser5<string_t>::peek(const string_iter_t& begin, const string_iter_t& end, size_t* plen)
|
||||
{
|
||||
if (begin == end) {
|
||||
if (plen) *plen = 0;
|
||||
if (plen) {
|
||||
*plen = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
uint8_t head = *begin;
|
||||
@@ -549,10 +574,12 @@ inline typename parser5<string_t>::u8char parser5<string_t>::peek(const std::str
|
||||
{
|
||||
return peek(str.cbegin(), str.cend());
|
||||
}
|
||||
|
||||
inline constexpr size_t operator"" _sz(unsigned long long size)
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline typename parser5<string_t>::u8char parser5<string_t>::read()
|
||||
{
|
||||
@@ -581,11 +608,15 @@ inline typename parser5<string_t>::u8char parser5<string_t>::read()
|
||||
template <typename string_t>
|
||||
inline std::string parser5<string_t>::StringFromCharCode(typename parser5<string_t>::u8char code)
|
||||
{
|
||||
if (code == 0) return "";
|
||||
if (code == 0) {
|
||||
return "";
|
||||
}
|
||||
std::string str;
|
||||
for (auto i = 0; i < 8; ++i) {
|
||||
auto ch = (0xff & code);
|
||||
if (ch) str.insert(0, 1, static_cast<char>(ch));
|
||||
if (ch) {
|
||||
str.insert(0, 1, static_cast<char>(ch));
|
||||
}
|
||||
code >>= 8;
|
||||
}
|
||||
return str;
|
||||
@@ -700,7 +731,8 @@ inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_m
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_multiLineCommentAsterisk()
|
||||
inline std::optional<typename parser5<string_t>::Token>
|
||||
parser5<string_t>::lex_multiLineCommentAsterisk()
|
||||
{
|
||||
switch (_current_char) {
|
||||
case '*':
|
||||
@@ -808,7 +840,8 @@ inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_v
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_identifierNameStartEscape()
|
||||
inline std::optional<typename parser5<string_t>::Token>
|
||||
parser5<string_t>::lex_identifierNameStartEscape()
|
||||
{
|
||||
if (_current_char != 'u') {
|
||||
throw InvalidChar(_current_char, exceptionDetailInfo());
|
||||
@@ -855,7 +888,8 @@ inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_i
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_identifierNameEscape()
|
||||
inline std::optional<typename parser5<string_t>::Token>
|
||||
parser5<string_t>::lex_identifierNameEscape()
|
||||
{
|
||||
if (_current_char != 'u') {
|
||||
throw InvalidChar(_current_char, exceptionDetailInfo());
|
||||
@@ -1047,7 +1081,8 @@ inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_d
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline std::optional<typename parser5<string_t>::Token> parser5<string_t>::lex_decimalExponentInteger()
|
||||
inline std::optional<typename parser5<string_t>::Token>
|
||||
parser5<string_t>::lex_decimalExponentInteger()
|
||||
{
|
||||
if (unicode::isDigit(_current_char)) {
|
||||
_buffer += StringFromCharCode(read());
|
||||
@@ -1386,7 +1421,8 @@ inline void parser5<string_t>::parse_afterArrayValue()
|
||||
|
||||
template <typename string_t>
|
||||
inline void parser5<string_t>::parse_end()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
template <typename string_t>
|
||||
inline void parser5<string_t>::parseStates(ParseState state)
|
||||
@@ -1417,6 +1453,7 @@ inline void parser5<string_t>::parseStates(ParseState state)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* stack operation */
|
||||
template <typename string_t>
|
||||
inline void parser5<string_t>::push()
|
||||
|
||||
2
3rdparty/include/meojson/parser5/unicode.h
vendored
2
3rdparty/include/meojson/parser5/unicode.h
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json5.hpp>
|
||||
|
||||
// This is a generated file. Do not edit.
|
||||
#pragma once
|
||||
#include <array>
|
||||
|
||||
456
3rdparty/include/meojson/reflection/jsonization.hpp
vendored
456
3rdparty/include/meojson/reflection/jsonization.hpp
vendored
@@ -1,3 +1,5 @@
|
||||
// IWYU pragma: private, include <meojson/json.hpp>
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
@@ -8,9 +10,12 @@
|
||||
namespace json::_jsonization_helper
|
||||
{
|
||||
struct next_is_optional_t
|
||||
{};
|
||||
{
|
||||
};
|
||||
|
||||
struct va_arg_end
|
||||
{};
|
||||
{
|
||||
};
|
||||
|
||||
struct dumper
|
||||
{
|
||||
@@ -21,19 +26,25 @@ struct dumper
|
||||
result.emplace(key, var);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename... rest_t>
|
||||
json::value _to_json(const char*, next_is_optional_t, rest_t&&... rest) const
|
||||
{
|
||||
return _to_json(std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
json::value _to_json(va_arg_end) const { return {}; }
|
||||
};
|
||||
|
||||
struct checker
|
||||
{
|
||||
template <typename var_t, typename... rest_t>
|
||||
bool _check_json(const json::value& in, std::string& error_key, const char* key, const var_t&,
|
||||
rest_t&&... rest) const
|
||||
bool _check_json(
|
||||
const json::value& in,
|
||||
std::string& error_key,
|
||||
const char* key,
|
||||
const var_t&,
|
||||
rest_t&&... rest) const
|
||||
{
|
||||
auto opt = in.find(key);
|
||||
if (!opt || !opt->is<var_t>()) {
|
||||
@@ -42,9 +53,16 @@ struct checker
|
||||
}
|
||||
return _check_json(in, error_key, std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
template <typename var_t, typename... rest_t>
|
||||
bool _check_json(const json::value& in, std::string& error_key, const char*, next_is_optional_t, const char* key,
|
||||
const var_t&, rest_t&&... rest) const
|
||||
bool _check_json(
|
||||
const json::value& in,
|
||||
std::string& error_key,
|
||||
const char*,
|
||||
next_is_optional_t,
|
||||
const char* key,
|
||||
const var_t&,
|
||||
rest_t&&... rest) const
|
||||
{
|
||||
auto opt = in.find(key);
|
||||
if (opt) {
|
||||
@@ -56,13 +74,19 @@ struct checker
|
||||
|
||||
return _check_json(in, error_key, std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
bool _check_json(const json::value&, std::string&, va_arg_end) const { return true; }
|
||||
};
|
||||
|
||||
struct loader
|
||||
{
|
||||
template <typename var_t, typename... rest_t>
|
||||
bool _from_json(const json::value& in, std::string& error_key, const char* key, var_t& var, rest_t&&... rest) const
|
||||
bool _from_json(
|
||||
const json::value& in,
|
||||
std::string& error_key,
|
||||
const char* key,
|
||||
var_t& var,
|
||||
rest_t&&... rest) const
|
||||
{
|
||||
auto opt = in.find(key);
|
||||
if (!opt || !opt->is<var_t>()) {
|
||||
@@ -73,9 +97,16 @@ struct loader
|
||||
|
||||
return _from_json(in, error_key, std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
template <typename var_t, typename... rest_t>
|
||||
bool _from_json(const json::value& in, std::string& error_key, const char*, next_is_optional_t, const char* key,
|
||||
var_t& var, rest_t&&... rest) const
|
||||
bool _from_json(
|
||||
const json::value& in,
|
||||
std::string& error_key,
|
||||
const char*,
|
||||
next_is_optional_t,
|
||||
const char* key,
|
||||
var_t& var,
|
||||
rest_t&&... rest) const
|
||||
{
|
||||
auto opt = in.find(key);
|
||||
if (opt) {
|
||||
@@ -88,6 +119,7 @@ struct loader
|
||||
|
||||
return _from_json(in, error_key, std::forward<rest_t>(rest)...);
|
||||
}
|
||||
|
||||
bool _from_json(const json::value&, std::string&, va_arg_end) const { return true; }
|
||||
};
|
||||
} // namespace json::_jsonization_helper
|
||||
@@ -111,122 +143,322 @@ namespace json::_private_macro
|
||||
|
||||
#define _MEOJSON_FOR_EACH_0(pred, ...)
|
||||
#define _MEOJSON_FOR_EACH_1(pred, x, ...) pred(x)
|
||||
#define _MEOJSON_FOR_EACH_2(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_1(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_3(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_2(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_4(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_3(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_5(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_4(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_6(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_5(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_7(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_6(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_8(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_7(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_9(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_8(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_10(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_9(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_11(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_10(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_12(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_11(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_13(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_12(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_14(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_13(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_15(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_14(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_16(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_15(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_17(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_16(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_18(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_17(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_19(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_18(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_20(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_19(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_21(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_20(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_22(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_21(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_23(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_22(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_24(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_23(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_25(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_24(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_26(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_25(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_27(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_26(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_28(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_27(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_29(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_28(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_30(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_29(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_31(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_30(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_32(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_31(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_33(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_32(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_34(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_33(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_35(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_34(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_36(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_35(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_37(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_36(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_38(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_37(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_39(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_38(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_40(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_39(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_41(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_40(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_42(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_41(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_43(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_42(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_44(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_43(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_45(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_44(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_46(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_45(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_47(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_46(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_48(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_47(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_49(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_48(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_50(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_49(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_51(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_50(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_52(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_51(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_53(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_52(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_54(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_53(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_55(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_54(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_56(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_55(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_57(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_56(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_58(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_57(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_59(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_58(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_60(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_59(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_61(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_60(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_62(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_61(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_63(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_62(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_64(pred, x, ...) pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_63(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_2(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_1(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_3(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_2(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_4(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_3(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_5(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_4(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_6(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_5(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_7(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_6(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_8(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_7(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_9(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_8(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_10(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_9(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_11(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_10(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_12(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_11(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_13(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_12(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_14(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_13(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_15(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_14(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_16(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_15(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_17(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_16(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_18(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_17(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_19(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_18(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_20(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_19(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_21(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_20(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_22(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_21(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_23(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_22(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_24(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_23(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_25(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_24(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_26(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_25(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_27(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_26(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_28(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_27(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_29(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_28(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_30(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_29(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_31(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_30(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_32(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_31(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_33(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_32(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_34(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_33(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_35(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_34(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_36(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_35(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_37(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_36(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_38(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_37(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_39(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_38(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_40(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_39(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_41(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_40(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_42(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_41(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_43(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_42(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_44(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_43(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_45(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_44(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_46(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_45(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_47(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_46(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_48(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_47(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_49(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_48(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_50(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_49(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_51(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_50(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_52(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_51(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_53(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_52(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_54(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_53(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_55(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_54(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_56(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_55(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_57(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_56(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_58(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_57(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_59(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_58(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_60(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_59(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_61(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_60(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_62(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_61(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_63(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_62(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_64(pred, x, ...) \
|
||||
pred(x) _MEOJSON_EXPAND(_MEOJSON_FOR_EACH_63(pred, __VA_ARGS__))
|
||||
|
||||
#define _MEOJSON_ARG_COUNT(...) \
|
||||
_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT1(0, ##__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, \
|
||||
49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, \
|
||||
30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, \
|
||||
11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
|
||||
#define _MEOJSON_ARG_COUNT1(_0, _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, _36, _37, \
|
||||
_38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, \
|
||||
_56, _57, _58, _59, _60, _61, _62, _63, _64, N, ...) \
|
||||
#define _MEOJSON_ARG_COUNT(...) \
|
||||
_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT1( \
|
||||
0, \
|
||||
##__VA_ARGS__, \
|
||||
64, \
|
||||
63, \
|
||||
62, \
|
||||
61, \
|
||||
60, \
|
||||
59, \
|
||||
58, \
|
||||
57, \
|
||||
56, \
|
||||
55, \
|
||||
54, \
|
||||
53, \
|
||||
52, \
|
||||
51, \
|
||||
50, \
|
||||
49, \
|
||||
48, \
|
||||
47, \
|
||||
46, \
|
||||
45, \
|
||||
44, \
|
||||
43, \
|
||||
42, \
|
||||
41, \
|
||||
40, \
|
||||
39, \
|
||||
38, \
|
||||
37, \
|
||||
36, \
|
||||
35, \
|
||||
34, \
|
||||
33, \
|
||||
32, \
|
||||
31, \
|
||||
30, \
|
||||
29, \
|
||||
28, \
|
||||
27, \
|
||||
26, \
|
||||
25, \
|
||||
24, \
|
||||
23, \
|
||||
22, \
|
||||
21, \
|
||||
20, \
|
||||
19, \
|
||||
18, \
|
||||
17, \
|
||||
16, \
|
||||
15, \
|
||||
14, \
|
||||
13, \
|
||||
12, \
|
||||
11, \
|
||||
10, \
|
||||
9, \
|
||||
8, \
|
||||
7, \
|
||||
6, \
|
||||
5, \
|
||||
4, \
|
||||
3, \
|
||||
2, \
|
||||
1, \
|
||||
0))
|
||||
#define _MEOJSON_ARG_COUNT1( \
|
||||
_0, \
|
||||
_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, \
|
||||
_36, \
|
||||
_37, \
|
||||
_38, \
|
||||
_39, \
|
||||
_40, \
|
||||
_41, \
|
||||
_42, \
|
||||
_43, \
|
||||
_44, \
|
||||
_45, \
|
||||
_46, \
|
||||
_47, \
|
||||
_48, \
|
||||
_49, \
|
||||
_50, \
|
||||
_51, \
|
||||
_52, \
|
||||
_53, \
|
||||
_54, \
|
||||
_55, \
|
||||
_56, \
|
||||
_57, \
|
||||
_58, \
|
||||
_59, \
|
||||
_60, \
|
||||
_61, \
|
||||
_62, \
|
||||
_63, \
|
||||
_64, \
|
||||
N, \
|
||||
...) \
|
||||
N
|
||||
|
||||
#define _MEOJSON_FOR_EACH_(N, pred, ...) _MEOJSON_EXPAND(_MEOJSON_CONCATENATE(_MEOJSON_FOR_EACH_, N)(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH_(N, pred, ...) \
|
||||
_MEOJSON_EXPAND(_MEOJSON_CONCATENATE(_MEOJSON_FOR_EACH_, N)(pred, __VA_ARGS__))
|
||||
#define _MEOJSON_FOR_EACH(pred, ...) \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH_(_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT(__VA_ARGS__)), pred, __VA_ARGS__))
|
||||
_MEOJSON_EXPAND( \
|
||||
_MEOJSON_FOR_EACH_(_MEOJSON_EXPAND(_MEOJSON_ARG_COUNT(__VA_ARGS__)), pred, __VA_ARGS__))
|
||||
|
||||
#define _MEOJSON_VARNAME(x) _MEOJSON_CONCATENATE(_meojson_jsonization_, x)
|
||||
#define _MEOJSON_KEY_VALUE(x) _MEOJSON_STRINGIZE(x), x,
|
||||
} // namespace json::_private_macro
|
||||
|
||||
#define MEO_TOJSON(...) \
|
||||
json::value to_json() const \
|
||||
{ \
|
||||
return json::_jsonization_helper::dumper()._to_json(_MEOJSON_EXPAND( \
|
||||
_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) json::_jsonization_helper::va_arg_end {}); \
|
||||
#define MEO_TOJSON(...) \
|
||||
json::value to_json() const \
|
||||
{ \
|
||||
return json::_jsonization_helper::dumper()._to_json( \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
}
|
||||
|
||||
#define MEO_CHECKJSON(...) \
|
||||
bool check_json(const json::value& _MEOJSON_VARNAME(in)) const \
|
||||
{ \
|
||||
std::string _MEOJSON_VARNAME(error_key); \
|
||||
return check_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
|
||||
} \
|
||||
bool check_json(const json::value& _MEOJSON_VARNAME(in), std::string& _MEOJSON_VARNAME(error_key)) const \
|
||||
{ \
|
||||
return json::_jsonization_helper::checker()._check_json( \
|
||||
_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key), \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
#define MEO_CHECKJSON(...) \
|
||||
bool check_json(const json::value& _MEOJSON_VARNAME(in)) const \
|
||||
{ \
|
||||
std::string _MEOJSON_VARNAME(error_key); \
|
||||
return check_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
|
||||
} \
|
||||
bool check_json( \
|
||||
const json::value& _MEOJSON_VARNAME(in), \
|
||||
std::string& _MEOJSON_VARNAME(error_key)) const \
|
||||
{ \
|
||||
return json::_jsonization_helper::checker()._check_json( \
|
||||
_MEOJSON_VARNAME(in), \
|
||||
_MEOJSON_VARNAME(error_key), \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
}
|
||||
|
||||
#define MEO_FROMJSON(...) \
|
||||
bool from_json(const json::value& _MEOJSON_VARNAME(in)) \
|
||||
{ \
|
||||
std::string _MEOJSON_VARNAME(error_key); \
|
||||
return from_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
|
||||
} \
|
||||
bool from_json(const json::value& _MEOJSON_VARNAME(in), std::string& _MEOJSON_VARNAME(error_key)) \
|
||||
{ \
|
||||
return json::_jsonization_helper::loader()._from_json( \
|
||||
_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key), \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
#define MEO_FROMJSON(...) \
|
||||
bool from_json(const json::value& _MEOJSON_VARNAME(in)) \
|
||||
{ \
|
||||
std::string _MEOJSON_VARNAME(error_key); \
|
||||
return from_json(_MEOJSON_VARNAME(in), _MEOJSON_VARNAME(error_key)); \
|
||||
} \
|
||||
bool from_json( \
|
||||
const json::value& _MEOJSON_VARNAME(in), \
|
||||
std::string& _MEOJSON_VARNAME(error_key)) \
|
||||
{ \
|
||||
return json::_jsonization_helper::loader()._from_json( \
|
||||
_MEOJSON_VARNAME(in), \
|
||||
_MEOJSON_VARNAME(error_key), \
|
||||
_MEOJSON_EXPAND(_MEOJSON_FOR_EACH(_MEOJSON_KEY_VALUE, __VA_ARGS__)) \
|
||||
json::_jsonization_helper::va_arg_end {}); \
|
||||
}
|
||||
|
||||
#define MEO_JSONIZATION(...) \
|
||||
|
||||
77
CHANGELOG.md
77
CHANGELOG.md
@@ -1,59 +1,48 @@
|
||||
## v5.15.0-beta.1
|
||||
## v5.16.5
|
||||
|
||||
### 新增 | New
|
||||
|
||||
* 添加控件半透明背景色,新增自定义背景 (#12204) @ABA2396 @status102
|
||||
* YoStarEN Sarkaz theme + JP and KR template optimization @Constrat
|
||||
* 新增 MirrorChyan ErrorCode 提示 (#12202) @ABA2396
|
||||
* Telegram Topic notification (#12188) @Constrat
|
||||
* 任务列表支持多个开始唤醒,以实现多账号 (#12144) @hguandl
|
||||
* SSS#6 for EN (#12168) @dragonheart107
|
||||
* check nightly version with mirrorchyan (#12173) @MistEO
|
||||
* 调整下载来源提示 (#12156) @MistEO
|
||||
* Mac新增基建配置 @hguandl
|
||||
* 特征匹配 (#10966) @status102
|
||||
* 绿票、黄票、活动商店 (#12586) @Daydreamer114 @status102 @ABA2396
|
||||
|
||||
### 改进 | Improved
|
||||
|
||||
* 孤星搓玉关 @Daydreamer114
|
||||
* 资源更新换一个解压目录 (#12153) @MistEO
|
||||
* 自动战斗开始前仅移除相似的召唤物头像缓存 @status102
|
||||
* 调整连战输出 @ABA2396
|
||||
* 肉鸽不期而遇退出检测加个重试 @status102
|
||||
|
||||
### 修复 | Fix
|
||||
|
||||
* CheckLevelMax ocr target "-" -> digits (#12223) @BxFS
|
||||
* handle leak @dantmnf
|
||||
* YostarKR lower StartToVisit templThreshold (#12193) @HX3N
|
||||
* 保全开始部署 点击过快导致点击无效 (#12185) @Daydreamer114
|
||||
* 自动战斗在开启战斗列表时导入作业后,关闭战斗列表开始任务时作业使用错误 @status102
|
||||
* SSS#6 directional EC and branches @Constrat
|
||||
* 控制中枢模板mask (#12177) @Daydreamer114
|
||||
* 繁中服_生息演算組裝道具後卡住 (#12182) @momomochi987 @Daydreamer114
|
||||
* xaml requires   @Constrat
|
||||
* 钼铅识别错误 @ABA2396
|
||||
* update version.json on Arknights-Tile-Pos changes fix 43c672df541bae77b484c2faeb23c4522230e3ca @Constrat
|
||||
* roguelike already left encounter check and return from map screen (#12088) @BxFS
|
||||
* 修复MaaCore asst.log文件句柄泄露 (#12639) @status102
|
||||
* 修复了屎遇上手动覆盖文件的大聪明爆炸的问题 @ABA2396
|
||||
* 凹开局干员直升精二选项显示时机错误 @ABA2396
|
||||
* 连战次数乘号匹配失败 @status102
|
||||
* store underfunded ocr full match @Daydreamer114
|
||||
|
||||
### 文档 | Docs
|
||||
|
||||
* add space @MistEO
|
||||
* 任务流color_scales注释优化 @status102
|
||||
|
||||
### 其他 | Other
|
||||
|
||||
* 繁中服「生路」活動導航 (#12224) @momomochi987
|
||||
* YostarKR Sarkaz Theme (#12220) @HX3N
|
||||
* gpu 选项禁用滚轮切换 @ABA2396
|
||||
* YostarJP Sarkaz Theme (#12216) @Manicsteiner
|
||||
* YostarJP 琳琅诗怀雅 ocr fix (#12219) @Manicsteiner
|
||||
* update wording about mirrorchyan (#12208) @MistEO
|
||||
* add delay pre UnlockClues @Constrat
|
||||
* YostarKR SSS#6 BuffChoose (#12191) @HX3N
|
||||
* update issue_template to remove new lines for EN @Constrat
|
||||
* 移除过时的重连代码 @ABA2396
|
||||
* tweak SSS files for global @Constrat
|
||||
* tweaked SSS copilot operators output @Constrat
|
||||
* add space after `:` @Constrat
|
||||
* YostarJP EnterInfrastDelicious (#12176) @Manicsteiner
|
||||
* 繁中服_聲浪安保派駐_定向導能元件 (#12174) @momomochi987
|
||||
* set output to UTF_8 for ResourceUpdater @Constrat
|
||||
* manual update version @MistEO
|
||||
* Revert "fix: roguelike already left encounter check and return from map screen (#12088)" @status102
|
||||
* Wpf肉鸽任务序列化 (#12124) @status102
|
||||
* yellow ticket items @Daydreamer114
|
||||
* ocrTask text @status102
|
||||
* Store@UnderfundedOCR @Daydreamer114
|
||||
* 再铲一屎 @status102
|
||||
* cache 移动逻辑 @ABA2396
|
||||
* ubuntu unused @status102
|
||||
* 铲屎 @status102
|
||||
* 指定类型 @status102
|
||||
* store loading @Daydreamer114
|
||||
* Revert "feat: 在肉鸽招募中增加m3作为群奶 (#12353)" @Saratoga-Official
|
||||
* 简化代码 @ABA2396
|
||||
* 提示补全 @status102
|
||||
* NumberReplace @status102
|
||||
* 再次调整官网细节 @MistEO
|
||||
* 调整官网标题 @MistEO
|
||||
* Revert "fix: github change string to int (#12574)" @Daydreamer114
|
||||
* 绿票、黄票、活动商店-国际服适配 (#12674) @Daydreamer114
|
||||
* mark @status102
|
||||
* 调整 UI 与 Core 版本不一致的解决方案提示 @ABA2396
|
||||
* 点击任意职业回正列表 @ABA2396
|
||||
* 基建先进行技能识别并返回列表首位,再清空选择 @ABA2396
|
||||
|
||||
@@ -81,7 +81,8 @@ if (BUILD_TEST)
|
||||
target_link_libraries(test MaaCore)
|
||||
endif (BUILD_TEST)
|
||||
|
||||
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs videoio)
|
||||
find_package(OpenCV REQUIRED COMPONENTS core imgproc imgcodecs videoio features2d)
|
||||
find_package(OpenCV QUIET COMPONENTS xfeatures2d)
|
||||
find_package(ZLIB REQUIRED)
|
||||
find_package(cpr CONFIG REQUIRED)
|
||||
|
||||
|
||||
@@ -2,17 +2,76 @@
|
||||
chcp 65001
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: 定义ANSI颜色代码
|
||||
for /f %%a in ('echo prompt $E^| cmd') do set "ESC=%%a"
|
||||
set "RESET=%ESC%[0m"
|
||||
set "GREEN=%ESC%[32m"
|
||||
set "RED=%ESC%[31m"
|
||||
set "YELLOW=%ESC%[33m"
|
||||
set "BLUE=%ESC%[34m"
|
||||
set "CYAN=%ESC%[36m"
|
||||
set "WHITE=%ESC%[37m"
|
||||
set "BOLD=%ESC%[1m"
|
||||
|
||||
:: 初始化错误标志
|
||||
set "ErrorOccurred=0"
|
||||
|
||||
openfiles >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo 正在获取管理员权限...
|
||||
echo Obtaining administrator privileges...
|
||||
echo %YELLOW%正在获取管理员权限...%RESET%
|
||||
echo %YELLOW%Obtaining administrator privileges...%RESET%
|
||||
powershell -Command "Start-Process cmd.exe -ArgumentList '/c %~dpnx0' -Verb RunAs"
|
||||
exit /b
|
||||
)
|
||||
|
||||
winget install "Microsoft.VCRedist.2015+.x64" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
|
||||
winget install "Microsoft.DotNet.DesktopRuntime.8" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
|
||||
echo.
|
||||
echo %BLUE%========================================%RESET%
|
||||
echo %BOLD%%CYAN%正在安装 Microsoft Visual C++ Redistributable%RESET%
|
||||
echo %BOLD%%CYAN%Installing Microsoft Visual C++ Redistributable%RESET%
|
||||
echo %BLUE%========================================%RESET%
|
||||
echo.
|
||||
|
||||
echo 运行库修复完成,请重启电脑后再次尝试运行 MAA。
|
||||
echo The runtime library repair is complete. Please restart your computer and try running MAA again.
|
||||
pause
|
||||
winget install "Microsoft.VCRedist.2015+.x64" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
|
||||
if %errorlevel% neq 0 (
|
||||
echo.
|
||||
echo %BOLD%%RED%错误: Microsoft.VCRedist.2015+.x64 安装失败%RESET%
|
||||
echo %BOLD%%RED%Error: Microsoft.VCRedist.2015+.x64 installation failed%RESET%
|
||||
set "ErrorOccurred=1"
|
||||
)
|
||||
|
||||
echo.
|
||||
echo %BLUE%========================================%RESET%
|
||||
echo %BOLD%%CYAN%正在安装 .NET Desktop Runtime 8.0%RESET%
|
||||
echo %BOLD%%CYAN%Installing .NET Desktop Runtime 8.0%RESET%
|
||||
echo %BLUE%========================================%RESET%
|
||||
echo.
|
||||
|
||||
winget install "Microsoft.DotNet.DesktopRuntime.8" --override "/repair /passive /norestart" --uninstall-previous --accept-package-agreements --force
|
||||
if %errorlevel% neq 0 (
|
||||
echo.
|
||||
echo %BOLD%%RED%错误: Microsoft.DotNet.DesktopRuntime.8 安装失败%RESET%
|
||||
echo %BOLD%%RED%Error: Microsoft.DotNet.DesktopRuntime.8 installation failed%RESET%
|
||||
set "ErrorOccurred=1"
|
||||
)
|
||||
|
||||
echo.
|
||||
if %ErrorOccurred% equ 0 (
|
||||
echo %BOLD%%GREEN%运行库修复完成,请重启电脑后再次尝试运行 MAA。%RESET%
|
||||
echo %BOLD%%GREEN%The runtime library repair is complete. Please restart your computer and try running MAA again.%RESET%
|
||||
) else (
|
||||
echo %RED%========================================%RESET%
|
||||
echo %BOLD%%RED%运行库修复过程中出现错误%RESET%
|
||||
echo %BOLD%%RED%Errors occurred during runtime library repair%RESET%
|
||||
echo.
|
||||
echo %YELLOW%您可以尝试手动下载并安装以下组件:%RESET%
|
||||
echo %YELLOW%You can try to manually download and install the following components:%RESET%
|
||||
echo.
|
||||
echo %WHITE%Microsoft Visual C++ Redistributable:%RESET%
|
||||
echo %CYAN%https://aka.ms/vs/17/release/vc_redist.x64.exe%RESET%
|
||||
echo.
|
||||
echo %WHITE%.NET Desktop Runtime 8.0:%RESET%
|
||||
echo %CYAN%https://aka.ms/dotnet/8.0/windowsdesktop-runtime-win-x64.exe%RESET%
|
||||
echo %RED%========================================%RESET%
|
||||
)
|
||||
|
||||
pause
|
||||
@@ -1,4 +1,4 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EN/@EntryIndexedValue">EN</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=KR/@EntryIndexedValue">KR</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JP/@EntryIndexedValue">JP</s:String>
|
||||
@@ -31,6 +31,8 @@
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/Abbreviations/=WSA/@EntryIndexedValue">WSA</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/Abbreviations/=XYAZ/@EntryIndexedValue">XYAZ</s:String>
|
||||
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=Github/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=_4E00_9375_8F2A/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/GrammarAndSpelling/GrammarChecking/Exceptions/=_591C_95F4_6A21_5F0F/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acast/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acfend/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=acguad/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -55,6 +57,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ccast/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cdfend/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cguard/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Chayn/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Chyan/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cmedic/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Collapsal/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -67,6 +70,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=dnplayer/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ehem/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=esource/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Eyjafjalla/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Favourite/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=filetime/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=findstr/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -94,9 +98,11 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ls_005B_0022sub/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=luestacks/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=maatouch/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=MAA_0027s/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=memuc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Minitouch/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=mirrorc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mirrorchyan/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mizuki/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mumu/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nemu/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -148,11 +154,14 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Stylet/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=subtask/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Suppressions/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Surtr/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=SWMINIMIZE/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=taskchain/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Todays/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=txwy/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ucrtbase/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=vmonitor/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Webhook/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=XYAZ/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Yahei/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=yituliu/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
12
README.md
12
README.md
@@ -33,7 +33,7 @@ MAA 的意思是 MAA Assistant Arknights
|
||||
|
||||
基于图像识别技术,一键完成全部日常任务!
|
||||
|
||||
绝赞更新中 ✿✿ヽ(°▽°)ノ✿
|
||||
绝赞更新中 ✿✿ヽ(°▽°)ノ✿
|
||||
|
||||
</div>
|
||||
|
||||
@@ -46,7 +46,7 @@ MAA 的意思是 MAA Assistant Arknights
|
||||
- 刷理智,掉落识别及上传 [企鹅物流](https://penguin-stats.cn/),[一图流](https://ark.yituliu.cn/)
|
||||
- 智能基建换班,自动计算干员效率,单设施内最优解;同时也支持 [自定义排班](https://maa.plus/docs/zh-cn/protocol/base-scheduling-schema.html)
|
||||
- 自动公招,可选使用加急许可,一次全部刷完!公招数据自动上传 [企鹅物流](https://penguin-stats.cn/result/stage/recruit/recruit),[一图流](https://ark.yituliu.cn/survey/maarecruitdata)
|
||||
- 支持手动识别公招界面,方便对高星公招做出选择 ~~(你的这个高姿回费出的是推王呢还是推王呢)~~
|
||||
- 支持手动识别公招界面,方便对高星公招做出选择 ~~(你的这个高资回费出的是推王呢还是推王呢)~~
|
||||
- 支持识别干员列表,统计已有和未有干员及潜能,并在公招识别显示
|
||||
- 支持识别养成材料,并导出至 [企鹅物流刷图规划](https://penguin-stats.cn/planner)、[明日方舟工具箱](https://arkntools.app/#/material)、[ARK-NIGHTS 干员培养表](https://ark-nights.com/settings)
|
||||
- 访问好友、收取信用及购物、领取日常奖励等,一键全日常自动长草
|
||||
@@ -192,7 +192,7 @@ MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)
|
||||
|
||||
## 声明
|
||||
|
||||
- 本软件使用 [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html) 开源。
|
||||
- 本软件使用 [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html) 开源,并附带额外 [用户协议](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev/terms-of-service.md)。
|
||||
- 本软件 logo 并非使用 AGPL 3.0 协议开源,[耗毛](https://weibo.com/u/3251357314)、vie 两位画师及软件全体开发者保留所有权利。不得以 AGPL 3.0 协议已授权为由在未经授权的情况下使用本软件 logo,不得在未经授权的情况下将本软件 logo 用于任何商业用途。
|
||||
- 本软件开源、免费,仅供学习交流使用。若您遇到商家使用本软件进行代练并收费,可能是设备与时间等费用,产生的问题及后果与本软件无关。
|
||||
|
||||
@@ -202,13 +202,13 @@ MAA 以中文(简体)为第一语言,翻译词条均以中文(简体)
|
||||
|
||||
## 广告
|
||||
|
||||
用户交流 QQ 群:[MAA 使用 & 粥游交流 QQ 群](https://ota.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
|
||||
用户交流 QQ 群:[MAA 使用 & 粥游交流 QQ 群](https://api.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
|
||||
Discord 服务器: [邀请链接](https://discord.gg/23DfZ9uA4V)
|
||||
用户交流 TG 群:[Telegram 群](https://t.me/+Mgc2Zngr-hs3ZjU1)
|
||||
自动战斗 JSON 作业分享:[prts.plus](https://prts.plus)
|
||||
Bilibili 直播间:[MrEO 直播间](https://live.bilibili.com/2808861) 直播敲代码 & [MAA-Official 直播间](https://live.bilibili.com/27548877) 游戏/杂谈
|
||||
Bilibili 直播间:[MrEO 直播间](https://live.bilibili.com/2808861) 直播敲代码 & [MAA-Official 直播间](https://live.bilibili.com/27548877) 游戏/杂谈
|
||||
|
||||
技术群(舟无关、禁水):[内卷地狱!(QQ 群)](https://jq.qq.com/?_wv=1027&k=ypbzXcA2)
|
||||
开发者群:[QQ 群](https://jq.qq.com/?_wv=1027&k=JM9oCk3C)
|
||||
开发者群:[QQ 群](https://jq.qq.com/?_wv=1027&k=JM9oCk3C)
|
||||
|
||||
如果觉得软件对你有帮助,帮忙点个 Star 吧!~(网页最上方右上角的小星星),这就是对我们最大的支持了!
|
||||
|
||||
52
docs/.vuepress/components/LanguageDropdown.ts
Normal file
52
docs/.vuepress/components/LanguageDropdown.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import type { VNode } from "vue";
|
||||
import { defineComponent, h } from "vue";
|
||||
|
||||
import NavbarDropdown from "@theme-hope/modules/navbar/components/NavbarDropdown";
|
||||
import { I18nIcon } from "@theme-hope/modules/navbar/components/icons/index";
|
||||
import { useNavbarLanguageDropdown } from "@theme-hope/modules/navbar/composables/index";
|
||||
|
||||
export default defineComponent({
|
||||
name: "LanguageDropdown",
|
||||
|
||||
setup() {
|
||||
const dropdown = useNavbarLanguageDropdown();
|
||||
|
||||
const filteredDropdown = () => {
|
||||
if (!dropdown.value) return null;
|
||||
|
||||
const filteredConfig = { ...dropdown.value };
|
||||
|
||||
if (filteredConfig.children) {
|
||||
filteredConfig.children = filteredConfig.children.filter(item => item.link !== '/');
|
||||
}
|
||||
|
||||
return filteredConfig;
|
||||
};
|
||||
|
||||
//console.log("OldLanguageDropdown", dropdown.value);
|
||||
//console.log("NewLanguageDropdown", filteredDropdown());
|
||||
|
||||
return (): VNode | null =>
|
||||
dropdown.value
|
||||
? h(
|
||||
"div",
|
||||
{ class: "vp-nav-item" },
|
||||
h(
|
||||
NavbarDropdown,
|
||||
{ config: filteredDropdown() },
|
||||
{
|
||||
title: () =>
|
||||
h(I18nIcon, {
|
||||
"aria-label": filteredDropdown()?.ariaLabel,
|
||||
style: {
|
||||
width: "1rem",
|
||||
height: "1rem",
|
||||
verticalAlign: "middle",
|
||||
},
|
||||
}),
|
||||
},
|
||||
),
|
||||
)
|
||||
: null;
|
||||
},
|
||||
});
|
||||
@@ -1,8 +1,11 @@
|
||||
import { defineUserConfig } from "vuepress";
|
||||
import { getDirname, path } from "vuepress/utils";
|
||||
import { viteBundler } from "@vuepress/bundler-vite";
|
||||
import { googleAnalyticsPlugin } from "@vuepress/plugin-google-analytics";
|
||||
import Theme from "./theme";
|
||||
|
||||
const __dirname = getDirname(import.meta.url);
|
||||
|
||||
export default defineUserConfig({
|
||||
base: "/docs/",
|
||||
lang: "zh-CN",
|
||||
@@ -11,24 +14,29 @@ export default defineUserConfig({
|
||||
port: 3001,
|
||||
|
||||
locales: {
|
||||
"/": {
|
||||
lang: " ",
|
||||
title: " ",
|
||||
description: " ",
|
||||
},
|
||||
"/zh-cn/": {
|
||||
lang: "zh-CN",
|
||||
lang: "zh-cn",
|
||||
description: "文档",
|
||||
},
|
||||
"/zh-tw/": {
|
||||
lang: "zh-TW",
|
||||
lang: "zh-tw",
|
||||
description: "文件",
|
||||
},
|
||||
"/en-us/": {
|
||||
lang: "en-US",
|
||||
lang: "en-us",
|
||||
description: "Documentation",
|
||||
},
|
||||
"/ja-jp/": {
|
||||
lang: "ja-JP",
|
||||
lang: "ja-jp",
|
||||
description: "ドキュメンテーション",
|
||||
},
|
||||
"/ko-kr/": {
|
||||
lang: "ko-KR",
|
||||
lang: "ko-kr",
|
||||
description: "선적 서류 비치",
|
||||
},
|
||||
},
|
||||
@@ -41,6 +49,13 @@ export default defineUserConfig({
|
||||
|
||||
theme: Theme,
|
||||
|
||||
alias: {
|
||||
"@theme-hope/modules/navbar/components/LanguageDropdown": path.resolve(
|
||||
__dirname,
|
||||
"./components/LanguageDropdown.ts",
|
||||
),
|
||||
},
|
||||
|
||||
plugins: [
|
||||
googleAnalyticsPlugin({
|
||||
id: "G-FJQDKG394Z",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
$sidebar-width: 16rem;
|
||||
$content-width: 1000px;
|
||||
|
||||
$font-family: '-apple-system, BlinkMacSystemFont, "Noto Sans SC", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", STHeiti, "Microsoft YaHei", sans-serif';
|
||||
$font-family-heading: 'Georgia, -apple-system, "Nimbus Roman No9 L", "PingFang SC", "Hiragino Sans GB", "Noto Serif SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "ST Heiti", sans-serif';
|
||||
$font-family-mono: '"Sarasa Gothic", "Jetbrains mono", "Fira Code", "Noto Sans SC", Consolas, monospace, Menlo, "Courier New"';
|
||||
$vp-font: '-apple-system, BlinkMacSystemFont, "Noto Sans SC", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", STHeiti, "Microsoft YaHei", sans-serif';
|
||||
$vp-font-heading: 'Georgia, -apple-system, "Nimbus Roman No9 L", "PingFang SC", "Hiragino Sans GB", "Noto Serif SC", "Microsoft Yahei", "WenQuanYi Micro Hei", "ST Heiti", sans-serif';
|
||||
$vp-font-mono: '"Sarasa Gothic", "Jetbrains mono", "Fira Code", "Noto Sans SC", Consolas, monospace, Menlo, "Courier New"';
|
||||
|
||||
html[lang="ja-JP"] {
|
||||
$font-family: "Helvetica Neue, Arial, Hiragino Kaku Gothic ProN, Hiragino Sans, Meiryo, sans-serif";
|
||||
$vp-font: "Helvetica Neue, Arial, Hiragino Kaku Gothic ProN, Hiragino Sans, Meiryo, sans-serif";
|
||||
}
|
||||
|
||||
@@ -5,11 +5,15 @@ import { zhcnSidebar, zhtwSidebar, enusSidebar, jajpSidebar, kokrSidebar } from
|
||||
|
||||
export default hopeTheme({
|
||||
hostname: "https://maa.plus",
|
||||
iconAssets: "iconify",
|
||||
author: "MaaAssistantArknights",
|
||||
license: "AGPL-3.0",
|
||||
repo: "MaaAssistantArknights/MaaAssistantArknights",
|
||||
docsBranch: "dev",
|
||||
docsDir: "/docs",
|
||||
|
||||
lastUpdated: false,
|
||||
contributors: false,
|
||||
|
||||
locales: {
|
||||
"/zh-cn/": {
|
||||
navbar: zhcnNavbar,
|
||||
@@ -23,6 +27,7 @@ export default hopeTheme({
|
||||
navbar: zhtwNavbar,
|
||||
sidebar: zhtwSidebar,
|
||||
displayFooter: false,
|
||||
title: '繁体中文',
|
||||
metaLocales: {
|
||||
editLink: "在 Github 上編輯此頁面",
|
||||
},
|
||||
@@ -53,6 +58,33 @@ export default hopeTheme({
|
||||
},
|
||||
},
|
||||
|
||||
markdown: {
|
||||
align: true,
|
||||
codeTabs: true,
|
||||
//echarts: true,
|
||||
footnote: true,
|
||||
gfm: true,
|
||||
hint: true,
|
||||
imgLazyload: true,
|
||||
imgMark: true,
|
||||
imgSize: true,
|
||||
//mathjax: true,
|
||||
mark: true,
|
||||
//mermaid: true,
|
||||
tabs: true,
|
||||
tasklist: true,
|
||||
vPre: true,
|
||||
component: true,
|
||||
|
||||
highlighter: {
|
||||
'type': 'shiki',
|
||||
themes: {
|
||||
light: "light-plus",
|
||||
dark: "nord",
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
plugins: {
|
||||
activeHeaderLinks: false,
|
||||
|
||||
@@ -66,111 +98,88 @@ export default hopeTheme({
|
||||
strict: true,
|
||||
},
|
||||
|
||||
copyright: {
|
||||
license: "AGPL-3.0",
|
||||
},
|
||||
|
||||
docsearch: DocSearchConfig,
|
||||
|
||||
mdEnhance: {
|
||||
align: true,
|
||||
codetabs: true,
|
||||
//echarts: true,
|
||||
footnote: true,
|
||||
gfm: true,
|
||||
hint: true,
|
||||
imgLazyload: true,
|
||||
imgMark: true,
|
||||
imgSize: true,
|
||||
//mathjax: true,
|
||||
mark: true,
|
||||
//mermaid: true,
|
||||
tabs: true,
|
||||
tasklist: true,
|
||||
vPre: true,
|
||||
component: true,
|
||||
},
|
||||
|
||||
shiki: {
|
||||
themes: {
|
||||
light: "light-plus",
|
||||
dark: "nord",
|
||||
}
|
||||
icon: {
|
||||
assets: "iconify",
|
||||
},
|
||||
|
||||
sitemap: true,
|
||||
seo: true,
|
||||
|
||||
notice: [
|
||||
{
|
||||
path: "/zh-tw/",
|
||||
title: "翻译警告",
|
||||
content: "MAA 的文檔以簡體中文為主,其他語言的文檔可能品質低或尚未翻譯,請諒解。",
|
||||
fullscreen: true,
|
||||
confirm: true,
|
||||
showOnce: true,
|
||||
actions: [
|
||||
{
|
||||
text: "我知道了",
|
||||
type: "primary",
|
||||
},
|
||||
{ text: "前往簡體中文",
|
||||
link: "/zh-cn/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/en-us/",
|
||||
title: "Translation Warning",
|
||||
content: "MAA's documents are mainly in Simplified Chinese. Documents in other languages may be of low quality or not yet translated. Please understand.",
|
||||
fullscreen: true,
|
||||
confirm: true,
|
||||
showOnce: true,
|
||||
actions: [
|
||||
{
|
||||
text: "Okay",
|
||||
type: "primary",
|
||||
},
|
||||
{ text: "Take me to zh-CN",
|
||||
link: "/zh-cn/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/ja-jp/",
|
||||
title: "翻訳に関する警告",
|
||||
content: "MAA のドキュメントは主に簡体字中国語で書かれており、他の言語のドキュメントは低品質であるか、翻訳されていない可能性がありますので、ご了承ください。",
|
||||
fullscreen: true,
|
||||
confirm: true,
|
||||
showOnce: true,
|
||||
actions: [
|
||||
{
|
||||
text: "OK",
|
||||
type: "primary",
|
||||
},
|
||||
{ text: "中国語サイトへ行く",
|
||||
link: "/zh-cn/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/ko-kr/",
|
||||
title: "번역 경고",
|
||||
content: "MAA의 문서는 주로 중국어 간체로 되어 있습니다. 다른 언어로 된 문서는 번역이 이상하거나, 번역이 되어있지 않을 수 있습니다.",
|
||||
fullscreen: true,
|
||||
confirm: true,
|
||||
showOnce: true,
|
||||
actions: [
|
||||
{
|
||||
text: "OK",
|
||||
type: "primary",
|
||||
},
|
||||
{ text: "중국어 간체로 이동",
|
||||
link: "/zh-cn/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/zh-tw/",
|
||||
title: "翻译警告",
|
||||
content: "MAA 的文檔以簡體中文為主,其他語言的文檔可能品質低或尚未翻譯,請諒解。",
|
||||
fullscreen: true,
|
||||
confirm: true,
|
||||
showOnce: true,
|
||||
actions: [
|
||||
{
|
||||
text: "我知道了",
|
||||
type: "primary",
|
||||
},
|
||||
{
|
||||
text: "前往簡體中文",
|
||||
link: "/zh-cn/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/en-us/",
|
||||
title: "Translation Warning",
|
||||
content: "MAA's documents are mainly in Simplified Chinese. Documents in other languages may be of low quality or not yet translated. Please understand.",
|
||||
fullscreen: true,
|
||||
confirm: true,
|
||||
showOnce: true,
|
||||
actions: [
|
||||
{
|
||||
text: "Okay",
|
||||
type: "primary",
|
||||
},
|
||||
{
|
||||
text: "Take me to zh-CN",
|
||||
link: "/zh-cn/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/ja-jp/",
|
||||
title: "翻訳に関する警告",
|
||||
content: "MAA のドキュメントは主に簡体字中国語で書かれており、他の言語のドキュメントは低品質であるか、翻訳されていない可能性がありますので、ご了承ください。",
|
||||
fullscreen: true,
|
||||
confirm: true,
|
||||
showOnce: true,
|
||||
actions: [
|
||||
{
|
||||
text: "OK",
|
||||
type: "primary",
|
||||
},
|
||||
{
|
||||
text: "中国語サイトへ行く",
|
||||
link: "/zh-cn/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "/ko-kr/",
|
||||
title: "번역 경고",
|
||||
content: "MAA의 문서는 주로 중국어 간체로 되어 있습니다. 다른 언어로 된 문서는 번역이 이상하거나, 번역이 되어있지 않을 수 있습니다.",
|
||||
fullscreen: true,
|
||||
confirm: true,
|
||||
showOnce: true,
|
||||
actions: [
|
||||
{
|
||||
text: "OK",
|
||||
type: "primary",
|
||||
},
|
||||
{
|
||||
text: "중국어 간체로 이동",
|
||||
link: "/zh-cn/",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
});
|
||||
}, { custom: true });
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
|
||||
---
|
||||
home: true
|
||||
pageInfo: false
|
||||
breadcrumb: false
|
||||
navbar: false
|
||||
sidebar: false
|
||||
index: false
|
||||
lastUpdated: false
|
||||
editLink: false
|
||||
contributors: false
|
||||
prev: false
|
||||
next: false
|
||||
---
|
||||
|
||||
|
||||
!: .7:~!.
|
||||
:. :?55 ?5~::~J?:
|
||||
@@ -47,7 +60,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
. . . . .
|
||||
7^.::?7:^: :7?:...P:. :~~~7P~~~^. :Y ^~~G!~~. :J?:^.?^^5 !! Y^ :Y.. ~~~^~Y!^~~: :P. :^^^JY .7~!.!~::5.
|
||||
.:. ~^ 7? :YJ.77.P:~? Y~~7P~~J: ~7J^~!!P7!!.::JY?J:Y ?^ ^G..5~:P^!J .YJ Y7^Y Y^ :? 5 Y. P
|
||||
@@ -57,6 +69,6 @@
|
||||
.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- markdownlint-disable-file -->
|
||||
|
||||
@@ -124,7 +124,7 @@ The formatting tool will automatically run every time you submit to ensure that
|
||||
|
||||
### Enable clang-format in Visual Studio
|
||||
|
||||
1. Install clang-format version 17 or higher.
|
||||
1. Install clang-format version 20.1.0 or higher.
|
||||
|
||||
```bash
|
||||
python -m pip install clang-format
|
||||
|
||||
@@ -418,6 +418,7 @@ binary = true # whether install maa-cli binary
|
||||
# hot update resource configurations
|
||||
[resource]
|
||||
auto_update = true # whether auto update resource before running task
|
||||
warn_on_update_failure = true # Whether to warn on update failure instead of panic
|
||||
backend = "libgit2" # the backend of resource, can be "libgit2" or "git"
|
||||
|
||||
# the remote of resource
|
||||
|
||||
@@ -96,7 +96,7 @@ maa-cli only provides an interface for MaaCore, it needs MaaCore and resources t
|
||||
maa install
|
||||
```
|
||||
|
||||
For users who installed via package managers, MaaCore can be installed via package managers:
|
||||
For users who installed via package managers, MaaCore can also be installed via package managers:
|
||||
|
||||
- Homebrew:
|
||||
|
||||
@@ -112,8 +112,6 @@ For users who installed via package managers, MaaCore can be installed via packa
|
||||
|
||||
- Nix:
|
||||
|
||||
```bash
|
||||
nix-env -iA nixpkgs.maa-assistant-arknights
|
||||
```
|
||||
maa-cli on Nix depends on the MaaCore package, so no additional installation is required.
|
||||
|
||||
**NOTE**: Only users who installed maa-cli via package managers can install MaaCore via package managers. Otherwise, please use the `maa install` command to install. In addition, the `maa install` downloads the official precompiled MaaCore, while the MaaCore installed by package managers has different compilation options and dependency versions from the official precompiled version. This does not affect the use of maa-cli but may cause differences in the functionality and performance of MaaCore. For example, the MaaCore installed by package managers uses a newer version of `fastdeploy`, while the official precompiled MaaCore uses an older version of `fastdeploy`. In the new version of `fastdeploy`, logs can be hidden, which can eliminate some unnecessary log output.
|
||||
**NOTE**: Only users who installed maa-cli via package managers can install MaaCore via package managers. Otherwise, please use the `maa install` command to install. In addition, the `maa install` downloads the official precompiled MaaCore, while the MaaCore installed by package managers has different compilation options and dependency versions from the official precompiled version, potentially causing variations in behavior and performance.
|
||||
|
||||
@@ -55,7 +55,7 @@ Fully compatible. Need to turn on `Settings` - `Advanced` - `Android Debug Bridg
|
||||
|
||||
### ✅ [Nox](https://www.yeshen.com/)
|
||||
|
||||
Fully compatible. MAAX cannot auto-detect adb port now, so you need to fill in adb port `127.0.0.1:62001` in MAA `Setting` - `Connect Setting`. Notice that port is not default `5555` , you can get more info in [Common ADB ports for popular Android emulators](../faq.md#common-adb-ports-for-popular-android-emulators)
|
||||
Fully compatible.
|
||||
|
||||
P.S.: Nox adb bin file path in Mac is `/Applications/NoxAppPlayer.app/Contents/MacOS/adb` , in parent path `MacOS` you are able to use `adb devices` command to get adb path.
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ const fullySupport = shuffleArray([
|
||||
{
|
||||
name: 'Bluestacks 5',
|
||||
link: 'https://www.bluestacks.com/',
|
||||
note: 'Fully compatible. Need to turn on `Allow ADB connections` in the emulator `Settings` - `Engine Settings`. Known to be compatible with Hyper-V.\n\n- Recommended to download [Offline Installer](https://support.bluestacks.com/hc/en-us/articles/4402611273485-BlueStacks-5-offline-installer) to avoid slow and bundled installation; recommend installing [Android 11](https://support.bluestacks.com/hc/en-us/articles/4402611273485-BlueStacks-5-offline-installer#:~:text=To%20install%20BlueStacks%205%20Android%2011) version; to uninstall it, please use the official [Uninstall Tool](https://support.bluestacks.com/hc/en-us/articles/360057724751-How-to-uninstall-BlueStacks-5-BlueStacks-X-and-BlueStacks-Services-completely-from-your-PC) to get rid of the residue.\n- If the adb port number keeps changing irregularly and is different every time you start it, it may be because your computer has [Hyper-V](https://support.bluestacks.com/hc/en-us/articles/4415238471053-System-requirements-for-BlueStacks-5-on-Hyper-V-enabled-Windows-10-and-11) enabled. MAA will now try to automatically read the port number within the Blue Stacker emulator configuration file, if this does not work/you have a need to multi-open/have more than one emulator kernel installed, please refer to the [Connection (TODO)](../connection.html#the-port-number-of-bluestack-emulator-hyper-v-is-different-every-time-it-is-started) to make changes. Since Hyper-V runs as administrator, operations that don\'t involve adb such as auto-shutdown of the emulator, auto-detect connection, etc. also need to run MAA as administrator.',
|
||||
note: 'Fully compatible. Need to turn on ADB Connectivity in the emulator `Settings` → `Advanced` → `Android Debug Bridge` → `Enable`. Known to be compatible with Hyper-V.\n\n- Recommended to download [Offline Installer](https://support.bluestacks.com/hc/en-us/articles/4402611273485-BlueStacks-5-offline-installer) to avoid slow and bundled installation; recommend installing [Android 11](https://support.bluestacks.com/hc/en-us/articles/4402611273485-BlueStacks-5-offline-installer#:~:text=To%20install%20BlueStacks%205%20Android%2011) version; to uninstall it, please use the official [Uninstall Tool](https://support.bluestacks.com/hc/en-us/articles/360057724751-How-to-uninstall-BlueStacks-5-BlueStacks-X-and-BlueStacks-Services-completely-from-your-PC) to get rid of the residue.\n- If the adb port number keeps changing irregularly and is different every time you start it, it may be because your computer has [Hyper-V](https://support.bluestacks.com/hc/en-us/articles/4415238471053-System-requirements-for-BlueStacks-5-on-Hyper-V-enabled-Windows-10-and-11) enabled. MAA will now try to automatically read the port number within the Blue Stacker emulator configuration file, if this does not work/you have a need to multi-open/have more than one emulator kernel installed, please refer to the [Connection (TODO)](../connection.html#the-port-number-of-bluestack-emulator-hyper-v-is-different-every-time-it-is-started) to make changes. Since Hyper-V runs as administrator, operations that don\'t involve adb such as auto-shutdown of the emulator, auto-detect connection, etc. also need to run MAA as administrator.',
|
||||
},
|
||||
{
|
||||
name: 'MuMu Emulator 12',
|
||||
@@ -37,7 +37,7 @@ const fullySupport = shuffleArray([
|
||||
{
|
||||
name: 'LDPlayer',
|
||||
link: 'https://www.ldmnq.com/',
|
||||
note: 'Fully compatible, with additional support for the [Screenshot Enhanced Mode](../connection.html#ld-screenshot-enhanced-mode). Known to be compatible with Hyper-V.\n\n- LDPlayer 9 installer will automatically and silently disable Hyper-V during the installation process. Please pay attention if you have related needs.',
|
||||
note: 'Fully compatible, with additional support for the [Screenshot Enhanced Mode](../connection.html#ld-screenshot-enhanced-mode). Need to turn on ADB Connectivity in the emulator : `Settings` → `Others` → `ADB debugging` → `Enable local connection`. Known to be compatible with Hyper-V.\n\n- LDPlayer 9 installer will automatically and silently disable Hyper-V during the installation process. Please pay attention if you have related needs.',
|
||||
},
|
||||
{
|
||||
name: 'Nox',
|
||||
|
||||
@@ -9,7 +9,7 @@ If this is your first time using MAA, please read [Getting Started](./newbie.md)
|
||||
|
||||
::: warning
|
||||
|
||||
If MAA fails to run after an update, or if you’ve reached this page via an error window in MAA, it’s highly likely due to outdated runtime libraries.
|
||||
If MAA fails to run after an update, or if you've reached this page via an error window in MAA, it's highly likely due to outdated runtime libraries.
|
||||
The most frequent issue is runtime-related, yet many users ignore the documentation and ask around, so we replaced the pinned message with this. It's frustrating.
|
||||
|
||||
Please run `DependencySetup_依赖库安装.bat` in the MAA directory, or execute the commands below in a terminal,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 3
|
||||
icon: hugeicons:brain-02
|
||||
---
|
||||
|
||||
# Combat
|
||||
@@ -20,6 +21,7 @@ order: 3
|
||||
- `Use Originium` will only be used after `Use Sanity Option`, because MAA will only use Originium to replenish sanity when there are no Sanity Potions left. Therefore, after checking `Use Originium`, MAA will lock the number of `Use Sanity Potion` to 999, making sure to consume all the Sanity Potions to avoid skipping the `Use Originium` judgment.
|
||||
|
||||
::: details Example
|
||||
|
||||
| Use Sanity Potion | Use Originium | Perform Battles | Material | Result |
|
||||
| :------: | :----: | :------: | :------: | -------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| | | | | Ends after using up the existing Sanity. |
|
||||
@@ -48,7 +50,7 @@ order: 3
|
||||
- Chip stages. The input must be complete with stage number, such as `PR-A-1`.
|
||||
- Annihilation. The input must be `Annihilation`.
|
||||
- Some side story stages, now contains `OF-1`, `OF-F3` and `GT-5`.
|
||||
- The last three stages of the current SS event. This is available after downloading updates automatically from the [API](https://ota.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) when the event is on. The prompt will be shown on the main page when this is available.
|
||||
- The last three stages of the current SS event. This is available after downloading updates automatically from the [API](https://api.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) when the event is on. The prompt will be shown on the main page when this is available.
|
||||
- For the SS event rerun, you can enter `SSReopen-XX` to clear XX-1 ~ XX-9 levels once. Example `SSReopen-IC`.
|
||||
|
||||
::: details Example
|
||||
@@ -87,9 +89,19 @@ It starts after the `Combat` task ends and is not controlled by `Use Sanity Poti
|
||||
|
||||
### Series
|
||||
|
||||
- MAA currently only performs consecutive battles according to the number of times set by the user and does not yet support automatic recognition of the maximum number of consecutive battles.
|
||||
- If the set number of times is too high but sanity is insufficient, MAA will directly perform the `Use Sanity Potion` or `Use Originium` operation and continue to attempt consecutive battles.
|
||||
- If `Use Sanity Potion` or `Use Originium` is not set, MAA will directly consider sanity insufficient and terminate the sanity farming task. If `Remaining Sanity` is set, MAA will directly start farming the `Remaining Sanity` stages.
|
||||
MAA will fight according to the number of consecutive battles set by the user:
|
||||
|
||||
- **AUTO mode** (0):
|
||||
- Automatically identify the maximum number of consecutive battles in the level, maintain the maximum number of consecutive battles and do not overflow sanity
|
||||
- Enter the `Remaining Sanity` process after completion (if set)
|
||||
|
||||
- **Numerical mode** (1~6):
|
||||
- Perform consecutive battles according to the set number of times
|
||||
- If the current sanity is not enough to complete the set number of times (such as only 5 times but set to 6 times), it will directly end the task and enter the `Remaining Sanity` process (if set)
|
||||
|
||||
- **Disable mode** (-1):
|
||||
- Do not adjust the number of consecutive battles in the game
|
||||
- If the sanity is not enough to complete the current set number of times in the game, directly end the task and enter the `Remaining Sanity` process (if set)
|
||||
|
||||
### Drop Recognition
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 9
|
||||
icon: ph:sword-bold
|
||||
---
|
||||
|
||||
# Copilot
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 5
|
||||
icon: solar:shop-2-bold
|
||||
---
|
||||
|
||||
# Credit Store
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 4
|
||||
icon: material-symbols:view-quilt-rounded
|
||||
---
|
||||
|
||||
# Base
|
||||
@@ -19,7 +20,7 @@ order: 4
|
||||
- The work shift strategy is based on the optimal solution within a single facility instead of multiple facilities. Combinations such as: `Shamare-Tequila`, `Vermeil-Scene` within a single facility can be recognized correctly; while combinations like `Rosmontis`, `Pinus Sylvestris` among facilities are not supported yet.
|
||||
- If `Usage of Drone` is selected with the option `Trading Post-LMD`, it will recognize `Shamare` and reserve it for her.
|
||||
- Operators of the corresponding faction will be selected when only one Clue is needed in the Reception Room; otherwise, general operators will be chosen.
|
||||
- The reception Room will send out Clues only when your Clues are full. Three Clues will be sent out at most. If wanted, you can edit the number of sent Clues in the `SelectClue` - `maxTimes` field in `resource/tasks.json`.
|
||||
- The reception Room will send out Clues only when your Clues are full. Three Clues will be sent out at most. If wanted, you can edit the number of sent Clues in the `ClueSelected` - `maxTimes` field in `resource/tasks/tasks.json`.
|
||||
- If you do not want operators like `Irene` or someone else to be put into the dormitory when the training room is not in use, you can switch off `Working operator shall not be put into the dormitory` in the settings. Note that this may cause the operators with non-full fatigue to not enter the dormitory as well.
|
||||
- Due to the complexity of the Control Center, only `Amiya`, `Swire`, `Kal'tsit`, `Team Rainbow` and other Morale+0.05 operators will be considered. To be improved in future.
|
||||
- Some alternate operators may have conflicts in Infrastructure. Please take note if there are "Operator conflict" warnings on the UI, and double check the Infrastructure to shift manually (e.g. some facilities may not have any operator).
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 7
|
||||
icon: ri:game-fill
|
||||
---
|
||||
|
||||
# Integrated Strategy (I.S.)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 11
|
||||
icon: icon-park-solid:other
|
||||
---
|
||||
|
||||
# Others
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 8
|
||||
icon: solar:streets-map-point-linear
|
||||
---
|
||||
|
||||
# Reclamation Algorithm (R.A.)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 2
|
||||
icon: fluent:people-24-filled
|
||||
---
|
||||
|
||||
# Recruit
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 6
|
||||
icon: lucide:gift
|
||||
---
|
||||
|
||||
# Rewards
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 1
|
||||
icon: ic:round-rocket-launch
|
||||
---
|
||||
|
||||
# Startup
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 10
|
||||
icon: octicon:tools-16
|
||||
---
|
||||
|
||||
# Tools
|
||||
|
||||
@@ -87,6 +87,7 @@ By default, only E1 Level 55 operators will be recruited
|
||||
1. Introduction to existing groups
|
||||
|
||||
Take Phantom's I.S. as an example: operators are mainly divided in
|
||||
|
||||
| Group | Considerations | Class | Operators |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| ***Ground block*** | 站场和清杂 | 重装, 近卫 | 奶盾, 基石, 羽毛笔, 山, M3, 令和稀音的召唤物, 斑点, 重装预备干员 |
|
||||
@@ -101,6 +102,7 @@ By default, only E1 Level 55 operators will be recruited
|
||||
2. Groups requiring special handling
|
||||
|
||||
In addition to those general groups, sometimes we need more custom tweaks for some operators or types such as
|
||||
|
||||
| Group | Operators | Features |
|
||||
| :--- | :--- | :--- |
|
||||
| Thorns | Thorns, Horn | Long-range melee, many maps have good spots |
|
||||
|
||||
@@ -76,8 +76,11 @@ Appends a task.
|
||||
"medicine": int, // Maximum number Sanity Potion used, optional, by default 0
|
||||
"expiring_medicine": int, // Maximum number of expired Sanity Potion within 48 hours, optional, by default 0
|
||||
"stone": int, // Maximum number of Originite Prime used, optional, by default 0
|
||||
"times": int, // Maximum times, optional, by default infinite
|
||||
"series": int, // Number of series, optional, 1~6
|
||||
"times": int, // Fight times, optional, by int32.max
|
||||
"series": int, // Number of series, optional, -1~6
|
||||
// -1 To disable switching series
|
||||
// 0 To automatically switch to the maximum number of series currently available, if the current sanity is less than 6 times, select the minimum number of times available
|
||||
// 1~6 To modify to a specified number of times
|
||||
"drops": { // Specifying the number of drops, optional, no specification by default
|
||||
"30011": int, // Key: item ID; value: number of items. Key refers to resource/item_index.json
|
||||
"30062": int // OR combination
|
||||
@@ -147,8 +150,9 @@ Supports some of the special stages,Please refer to [autoLocalization example](h
|
||||
{
|
||||
"enable": bool, // Whether to enable this task, optional, by default true
|
||||
"mode": int, // Shift mode, optional. Editing in run-time is not supported.
|
||||
// 0 - By Default, auto shift
|
||||
// 0 - By Default, auto shift
|
||||
// 10000 - Custom Mode, please refer 3.6-INFRASTRUCTURE_SCHEDULING_SCHEMA
|
||||
// 20000 - Rotation: One-key rotation mode, skips control center, power station, dormitory and office, other facilities do not change shifts but retain basic operations (such as using drones, reception room logic)
|
||||
"facility": [ // Facilities for shifting, required. Editing in run-time is not supported.
|
||||
string, // Facility name: "Mfg" | "Trade" | "Power" | "Control" | "Reception" | "Office" | "Dorm"
|
||||
...
|
||||
|
||||
@@ -5,7 +5,7 @@ icon: material-symbols:task
|
||||
|
||||
# Task Schema
|
||||
|
||||
Usage of `resource/tasks.json` and description of each field
|
||||
Usage of `resource/tasks` and description of each field
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -100,7 +100,7 @@ Usage of `resource/tasks.json` and description of each field
|
||||
// Then set "maskRange" to [ 1, 255 ], to instantly ignore the blacked-out parts when matching
|
||||
|
||||
"colorScales": [ // Effective and required when method is HSVCount or RGBCount, color mask range.
|
||||
[ // list<array<array<int, 3>, 2> | array<int, 2>>
|
||||
[ // list<array<array<int, 3>, 2>> / list<array<int, 2>>
|
||||
[23, 150, 40], // Structure is [[lower1, upper1], [lower2, upper2], ...]
|
||||
[25, 230, 150] // Inner layer is int if grayscale,
|
||||
], // is array<int, 3> if three-channel color, method determines whether it is RGB or HSV;
|
||||
@@ -136,12 +136,28 @@ Usage of `resource/tasks.json` and description of each field
|
||||
"isAscii": false, // optional, whether the text content to be recognized is ASCII characters
|
||||
// default false if not filled
|
||||
|
||||
"withoutDet": false // Optional, whether to not use the detection model
|
||||
"withoutDet": false, // Optional, whether to not use the detection model
|
||||
// default false if not filled
|
||||
|
||||
/* The following fields are only valid when the algorithm is Hash */
|
||||
// The algorithm is not mature, and is only used in some special cases, so it is not recommended for now
|
||||
// Todo
|
||||
|
||||
/* The following fields are valid only when algorithm is FeatureMatch */
|
||||
|
||||
"template": "xxx.png", // Optional, the image file name to match, can be a string or a string list
|
||||
// Default "taskname.png"
|
||||
|
||||
"count": 4, // The number of feature points to match (threshold), default value = 4
|
||||
|
||||
"ratio": 0.6, // The distance ratio of the KNN matching algorithm, [0 - 1.0], the larger the ratio, the looser the match and the easier it is to connect. Default 0.6
|
||||
|
||||
"detector": "SIFT", // Feature point detector type, optional values are SIFT, ORB, AKAZE, SURF; default value = SIFT
|
||||
// SIFT: High computational complexity, scale invariance, rotation invariance. Best effect.
|
||||
// ORB: Very fast computational speed, rotation invariance. But not scale invariance.
|
||||
// BRISK: Very fast computational speed, scale invariance, rotation invariance.
|
||||
// KAZE: Applicable to 2D and 3D images, with scale invariance and rotation invariance.
|
||||
// AKAZE: Fast calculation speed, with scale invariance and rotation invariance.
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -102,7 +102,7 @@ MAA supports command line interface (CLI) operation, supports Linux, macOS and W
|
||||
- New Framework: [MaaFramework](https://github.com/MaaXYZ/MaaFramework)
|
||||
- [Co-pilot (auto-battle) site](https://prts.plus) Frontend: [maa-copilot-frontend](https://github.com/MaaAssistantArknights/maa-copilot-frontend)
|
||||
- [Co-pilot (auto-battle) site](https://prts.plus) Backend: [MaaBackendCenter](https://github.com/MaaAssistantArknights/MaaBackendCenter)
|
||||
- [Website](https://www.maa.plus): [Frontend](https://github.com/MaaAssistantArknights/MaaAssistantArknights/tree/dev/website)
|
||||
- [Website](https://maa.plus): [Frontend](https://github.com/MaaAssistantArknights/MaaAssistantArknights/tree/dev/website)
|
||||
- Deep Learning: [MaaAI](https://github.com/MaaAssistantArknights/MaaAI)
|
||||
|
||||
### i18n
|
||||
@@ -191,7 +191,7 @@ Thanks to all friends who contribute to development/testing for making MAA bette
|
||||
|
||||
## Disclaimer
|
||||
|
||||
- This software is open source under the [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html).
|
||||
- This software is open source under the [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html), and comes with an additional [user agreement](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev/terms-of-service.md).
|
||||
- The logo of this software is NOT granted rights under AGPL 3.0 License. [耗毛](https://weibo.com/u/3251357314) and Vie, the two artists and all developers of the software reserves all rights. The logo of the software shall not be used without authorization even if the project has an AGPL 3.0 License. Nor shall the logo be used for commercial purposes without authorization.
|
||||
- The software is an open-source, free of charge software only for studying and communication purposes. There is no agreement or understanding between the developers of the software and the 3rd party person who uses this software as an assistant and charges you. In that case, the developers of the software are not responsible for the problems and consequences caused.
|
||||
|
||||
@@ -202,7 +202,7 @@ This software supports GPU acceleration, which relies on an independent componen
|
||||
## Advertisement
|
||||
|
||||
Discord Server: [Discord Invite](https://discord.gg/23DfZ9uA4V)
|
||||
User Group: [Telegram](https://t.me/+Mgc2Zngr-hs3ZjU1), [QQ Group](https://ota.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
|
||||
User Group: [Telegram](https://t.me/+Mgc2Zngr-hs3ZjU1), [QQ Group](https://api.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
|
||||
Copilot JSON Sharing: [prts.plus](https://prts.plus)
|
||||
Bilibili Livestreams: [MrEO Livestream](https://live.bilibili.com/2808861) Coding Sessions & [MAA-Official Livestream](https://live.bilibili.com/27548877) Gaming/Chats
|
||||
[Technical Discussion (QQ Group)](https://jq.qq.com/?_wv=1027&k=ypbzXcA2)
|
||||
|
||||
@@ -328,10 +328,19 @@
|
||||
"char_381_bubble": "Bubble",
|
||||
"char_385_finlpp": "Purestream",
|
||||
"char_440_pinecn": "Pinecone",
|
||||
"char_445_wscoot": "",
|
||||
"char_452_bstalk": "Beanstalk",
|
||||
"char_469_indigo": "Indigo",
|
||||
"char_484_robrta": "Roberta",
|
||||
"char_491_humus": "Humus",
|
||||
"char_600_cpione": "",
|
||||
"char_601_cguard": "",
|
||||
"char_602_cdfend": "",
|
||||
"char_603_csnipe": "",
|
||||
"char_604_ccast": "",
|
||||
"char_605_cmedic": "",
|
||||
"char_606_csuppo": "",
|
||||
"char_607_cspec": "",
|
||||
"char_4004_pudd": "Pudding",
|
||||
"char_4041_chnut": "Chestnut",
|
||||
"char_4062_totter": "Totter",
|
||||
@@ -339,7 +348,8 @@
|
||||
"char_4067_lolxh": "Luo Xiaohei",
|
||||
"char_4100_caper": "Caper",
|
||||
"char_4107_vrdant": "Verdant",
|
||||
"char_4130_luton": "Lutonada"
|
||||
"char_4130_luton": "Lutonada",
|
||||
"char_4165_ctrail": ""
|
||||
},
|
||||
"5": {
|
||||
"char_002_amiya": "Amiya",
|
||||
@@ -440,6 +450,7 @@
|
||||
"char_476_blkngt": "Blacknight",
|
||||
"char_478_kirara": "Kirara",
|
||||
"char_486_takila": "Tequila",
|
||||
"char_487_bobb": "Bobbing",
|
||||
"char_488_buildr": "Poncirus",
|
||||
"char_489_serum": "Corroserum",
|
||||
"char_492_quercu": "Quercus",
|
||||
@@ -460,7 +471,7 @@
|
||||
"char_1024_hbisc2": "Hibiscus the Purifier",
|
||||
"char_1027_greyy2": "Greyy the Lightningbearer",
|
||||
"char_1030_noirc2": "Rathalos S Noir Corne",
|
||||
"char_1036_fang2": "Fang the Fire-sharpened",
|
||||
"char_1036_fang2": "Fang the Fire-Sharpened",
|
||||
"char_4006_melnte": "Melanite",
|
||||
"char_4013_kjera": "Kjera",
|
||||
"char_4014_lunacu": "Lunacub",
|
||||
@@ -476,6 +487,7 @@
|
||||
"char_4043_erato": "Erato",
|
||||
"char_4045_heidi": "Heidi",
|
||||
"char_4047_pianst": "Czerny",
|
||||
"char_4052_surfer": "",
|
||||
"char_4054_malist": "Minimalist",
|
||||
"char_4066_highmo": "Highmore",
|
||||
"char_4071_peper": "Paprika",
|
||||
@@ -503,7 +515,17 @@
|
||||
"char_4143_sensi": "Senshi",
|
||||
"char_4144_chilc": "Chilchuck",
|
||||
"char_4147_mitm": "Mitm",
|
||||
"char_4151_tinman": "Tin Man"
|
||||
"char_4148_philae": "",
|
||||
"char_4151_tinman": "Tin Man",
|
||||
"char_4155_talr": "",
|
||||
"char_4162_cathy": "Catherine",
|
||||
"char_4163_rosesa": "",
|
||||
"char_4164_tecno": "",
|
||||
"char_4171_wulfen": "",
|
||||
"char_4172_xingzh": "",
|
||||
"char_4173_nowell": "",
|
||||
"char_4177_brigid": "",
|
||||
"char_4178_alanna": ""
|
||||
},
|
||||
"6": {
|
||||
"char_003_kalts": "Kal'tsit",
|
||||
@@ -551,15 +573,25 @@
|
||||
"char_427_vigil": "Vigil",
|
||||
"char_430_fartth": "Fartooth",
|
||||
"char_437_mizuki": "Mizuki",
|
||||
"char_450_necras": "",
|
||||
"char_456_ash": "Ash",
|
||||
"char_472_pasngr": "Passenger",
|
||||
"char_474_glady": "Gladiia",
|
||||
"char_479_sleach": "Saileach",
|
||||
"char_485_pallas": "Pallas",
|
||||
"char_608_acpion": "",
|
||||
"char_609_acguad": "",
|
||||
"char_610_acfend": "",
|
||||
"char_611_acnipe": "",
|
||||
"char_612_accast": "",
|
||||
"char_613_acmedc": "",
|
||||
"char_614_acsupo": "",
|
||||
"char_615_acspec": "",
|
||||
"char_1012_skadi2": "Skadi the Corrupting Heart",
|
||||
"char_1013_chen2": "Ch'en the Holungday",
|
||||
"char_1014_nearl2": "Nearl the Radiant Knight",
|
||||
"char_1016_agoat2": "Eyjafjalla the Hvít Aska",
|
||||
"char_1019_siege2": "Vina Victoria",
|
||||
"char_1020_reed2": "Reed the Flame Shadow",
|
||||
"char_1023_ghost2": "Specter the Unchained",
|
||||
"char_1026_gvial2": "Gavial the Invincible",
|
||||
@@ -570,6 +602,10 @@
|
||||
"char_1033_swire2": "Swire the Elegant Wit",
|
||||
"char_1034_jesca2": "Jessica the Liberated",
|
||||
"char_1035_wisdel": "Wiš'adel",
|
||||
"char_1038_whitw2": "",
|
||||
"char_1039_thorn2": "",
|
||||
"char_1040_blaze2": "",
|
||||
"char_1502_crosly": "",
|
||||
"char_2012_typhon": "Typhon",
|
||||
"char_2013_cerber": "Ceobe",
|
||||
"char_2014_nian": "Nian",
|
||||
@@ -577,8 +613,11 @@
|
||||
"char_2023_ling": "Ling",
|
||||
"char_2024_chyue": "Chongyue",
|
||||
"char_2025_shu": "Shu",
|
||||
"char_2026_yu": "",
|
||||
"char_4009_irene": "Irene",
|
||||
"char_4010_etlchi": "",
|
||||
"char_4011_lessng": "Lessing",
|
||||
"char_4026_vulpis": "",
|
||||
"char_4027_heyak": "Ho'olheyak",
|
||||
"char_4039_horn": "Horn",
|
||||
"char_4042_lumen": "Lumen",
|
||||
@@ -604,7 +643,8 @@
|
||||
"char_4138_narant": "Narantuya",
|
||||
"char_4141_marcil": "Marcille",
|
||||
"char_4145_ulpia": "Ulpianus",
|
||||
"char_4146_nymph": "Nymph"
|
||||
"char_4146_nymph": "Nymph",
|
||||
"char_4179_monstr": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,10 +328,19 @@
|
||||
"char_381_bubble": "バブル",
|
||||
"char_385_finlpp": "セイリュウ",
|
||||
"char_440_pinecn": "パインコーン",
|
||||
"char_445_wscoot": "",
|
||||
"char_452_bstalk": "ビーンストーク",
|
||||
"char_469_indigo": "インディゴ",
|
||||
"char_484_robrta": "ロベルタ",
|
||||
"char_491_humus": "ヒューマス",
|
||||
"char_600_cpione": "",
|
||||
"char_601_cguard": "",
|
||||
"char_602_cdfend": "",
|
||||
"char_603_csnipe": "",
|
||||
"char_604_ccast": "",
|
||||
"char_605_cmedic": "",
|
||||
"char_606_csuppo": "",
|
||||
"char_607_cspec": "",
|
||||
"char_4004_pudd": "プリン",
|
||||
"char_4041_chnut": "チェストナット",
|
||||
"char_4062_totter": "トター",
|
||||
@@ -339,7 +348,8 @@
|
||||
"char_4067_lolxh": "羅小黒",
|
||||
"char_4100_caper": "ケイパー",
|
||||
"char_4107_vrdant": "ヴァーダント",
|
||||
"char_4130_luton": "ルトナダ"
|
||||
"char_4130_luton": "ルトナダ",
|
||||
"char_4165_ctrail": ""
|
||||
},
|
||||
"5": {
|
||||
"char_002_amiya": "アーミヤ",
|
||||
@@ -440,6 +450,7 @@
|
||||
"char_476_blkngt": "ブラックナイト",
|
||||
"char_478_kirara": "キララ",
|
||||
"char_486_takila": "テキーラ",
|
||||
"char_487_bobb": "ボビング",
|
||||
"char_488_buildr": "ポンシラス",
|
||||
"char_489_serum": "コロセラム",
|
||||
"char_492_quercu": "クエルクス",
|
||||
@@ -476,6 +487,7 @@
|
||||
"char_4043_erato": "エラト",
|
||||
"char_4045_heidi": "ハイディ",
|
||||
"char_4047_pianst": "ツェルニー",
|
||||
"char_4052_surfer": "",
|
||||
"char_4054_malist": "ミニマリスト",
|
||||
"char_4066_highmo": "ハイモア",
|
||||
"char_4071_peper": "パプリカ",
|
||||
@@ -499,11 +511,21 @@
|
||||
"char_4137_udflow": "アンダーフロー",
|
||||
"char_4139_papyrs": "パピルス",
|
||||
"char_4140_lasher": "サンドレコナー",
|
||||
"char_4142_laios": "",
|
||||
"char_4143_sensi": "",
|
||||
"char_4144_chilc": "",
|
||||
"char_4147_mitm": "",
|
||||
"char_4151_tinman": ""
|
||||
"char_4142_laios": "ライオス",
|
||||
"char_4143_sensi": "センシ",
|
||||
"char_4144_chilc": "チルチャック",
|
||||
"char_4147_mitm": "ミトム",
|
||||
"char_4148_philae": "",
|
||||
"char_4151_tinman": "ブリキ",
|
||||
"char_4155_talr": "",
|
||||
"char_4162_cathy": "キャサリン",
|
||||
"char_4163_rosesa": "",
|
||||
"char_4164_tecno": "",
|
||||
"char_4171_wulfen": "",
|
||||
"char_4172_xingzh": "",
|
||||
"char_4173_nowell": "",
|
||||
"char_4177_brigid": "",
|
||||
"char_4178_alanna": ""
|
||||
},
|
||||
"6": {
|
||||
"char_003_kalts": "ケルシー",
|
||||
@@ -551,15 +573,25 @@
|
||||
"char_427_vigil": "ヴィジェル",
|
||||
"char_430_fartth": "ファートゥース",
|
||||
"char_437_mizuki": "ミヅキ",
|
||||
"char_450_necras": "",
|
||||
"char_456_ash": "Ash",
|
||||
"char_472_pasngr": "パッセンジャー",
|
||||
"char_474_glady": "グレイディーア",
|
||||
"char_479_sleach": "サイラッハ",
|
||||
"char_485_pallas": "パラス",
|
||||
"char_608_acpion": "",
|
||||
"char_609_acguad": "",
|
||||
"char_610_acfend": "",
|
||||
"char_611_acnipe": "",
|
||||
"char_612_accast": "",
|
||||
"char_613_acmedc": "",
|
||||
"char_614_acsupo": "",
|
||||
"char_615_acspec": "",
|
||||
"char_1012_skadi2": "濁心スカジ",
|
||||
"char_1013_chen2": "遊龍チェン",
|
||||
"char_1014_nearl2": "耀騎士ニアール",
|
||||
"char_1016_agoat2": "純燼エイヤフィヤトラ",
|
||||
"char_1019_siege2": "ヴィーナ・ヴィクトリア",
|
||||
"char_1020_reed2": "焔影リード",
|
||||
"char_1023_ghost2": "帰溟スペクター",
|
||||
"char_1026_gvial2": "百錬ガヴィル",
|
||||
@@ -570,6 +602,10 @@
|
||||
"char_1033_swire2": "琳琅スワイヤー",
|
||||
"char_1034_jesca2": "滌火ジェシカ",
|
||||
"char_1035_wisdel": "ウィシャデル",
|
||||
"char_1038_whitw2": "",
|
||||
"char_1039_thorn2": "",
|
||||
"char_1040_blaze2": "",
|
||||
"char_1502_crosly": "",
|
||||
"char_2012_typhon": "ティフォン",
|
||||
"char_2013_cerber": "ケオベ",
|
||||
"char_2014_nian": "ニェン",
|
||||
@@ -577,15 +613,18 @@
|
||||
"char_2023_ling": "リィン",
|
||||
"char_2024_chyue": "チョンユエ",
|
||||
"char_2025_shu": "シュウ",
|
||||
"char_2026_yu": "",
|
||||
"char_4009_irene": "アイリーニ",
|
||||
"char_4010_etlchi": "",
|
||||
"char_4011_lessng": "レッシング",
|
||||
"char_4026_vulpis": "",
|
||||
"char_4027_heyak": "ホルハイヤ",
|
||||
"char_4039_horn": "ホルン",
|
||||
"char_4042_lumen": "ルーメン",
|
||||
"char_4046_ebnhlz": "エーベンホルツ",
|
||||
"char_4048_doroth": "ドロシー",
|
||||
"char_4055_bgsnow": "パゼオンカ",
|
||||
"char_4058_pepe": "ぺぺ",
|
||||
"char_4058_pepe": "ペペ",
|
||||
"char_4064_mlynar": "ムリナール",
|
||||
"char_4065_judge": "ペナンス",
|
||||
"char_4072_ironmn": "ステインレス",
|
||||
@@ -602,9 +641,10 @@
|
||||
"char_4133_logos": "ロゴス",
|
||||
"char_4134_cetsyr": "シヴィライト・エテルナ",
|
||||
"char_4138_narant": "ナラントゥヤ",
|
||||
"char_4141_marcil": "",
|
||||
"char_4141_marcil": "マルシル",
|
||||
"char_4145_ulpia": "ウルピアヌス",
|
||||
"char_4146_nymph": ""
|
||||
"char_4146_nymph": "ニンフ",
|
||||
"char_4179_monstr": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,10 +328,19 @@
|
||||
"char_381_bubble": "버블",
|
||||
"char_385_finlpp": "퓨어스트림",
|
||||
"char_440_pinecn": "파인콘",
|
||||
"char_445_wscoot": "",
|
||||
"char_452_bstalk": "빈스토크",
|
||||
"char_469_indigo": "인디고",
|
||||
"char_484_robrta": "로베르타",
|
||||
"char_491_humus": "휴머스",
|
||||
"char_600_cpione": "",
|
||||
"char_601_cguard": "",
|
||||
"char_602_cdfend": "",
|
||||
"char_603_csnipe": "",
|
||||
"char_604_ccast": "",
|
||||
"char_605_cmedic": "",
|
||||
"char_606_csuppo": "",
|
||||
"char_607_cspec": "",
|
||||
"char_4004_pudd": "푸딩",
|
||||
"char_4041_chnut": "체스트넛",
|
||||
"char_4062_totter": "토터",
|
||||
@@ -339,7 +348,8 @@
|
||||
"char_4067_lolxh": "나소흑",
|
||||
"char_4100_caper": "케이퍼",
|
||||
"char_4107_vrdant": "버던트",
|
||||
"char_4130_luton": "루토나다"
|
||||
"char_4130_luton": "루토나다",
|
||||
"char_4165_ctrail": ""
|
||||
},
|
||||
"5": {
|
||||
"char_002_amiya": "아미야",
|
||||
@@ -440,6 +450,7 @@
|
||||
"char_476_blkngt": "블랙나이트",
|
||||
"char_478_kirara": "키라라",
|
||||
"char_486_takila": "테킬라",
|
||||
"char_487_bobb": "보빙",
|
||||
"char_488_buildr": "폰사이러스",
|
||||
"char_489_serum": "코로세럼",
|
||||
"char_492_quercu": "퀘르쿠스",
|
||||
@@ -476,11 +487,12 @@
|
||||
"char_4043_erato": "에라토",
|
||||
"char_4045_heidi": "하이디",
|
||||
"char_4047_pianst": "체르니",
|
||||
"char_4052_surfer": "",
|
||||
"char_4054_malist": "미니멀리스트",
|
||||
"char_4066_highmo": "하이모어",
|
||||
"char_4071_peper": "파프리카",
|
||||
"char_4078_bdhkgt": "지에윈",
|
||||
"char_4079_haini": "",
|
||||
"char_4079_haini": "루실라",
|
||||
"char_4081_warmy": "워미",
|
||||
"char_4083_chimes": "윈드차임스",
|
||||
"char_4102_threye": "발라크빈",
|
||||
@@ -496,14 +508,24 @@
|
||||
"char_4125_rdoc": "Doc",
|
||||
"char_4126_fuze": "Fuze",
|
||||
"char_4131_odda": "오다",
|
||||
"char_4137_udflow": "",
|
||||
"char_4139_papyrs": "",
|
||||
"char_4140_lasher": "",
|
||||
"char_4142_laios": "",
|
||||
"char_4143_sensi": "",
|
||||
"char_4144_chilc": "",
|
||||
"char_4147_mitm": "",
|
||||
"char_4151_tinman": ""
|
||||
"char_4137_udflow": "언더플로우",
|
||||
"char_4139_papyrs": "파피루스",
|
||||
"char_4140_lasher": "샌드레코너",
|
||||
"char_4142_laios": "라이오스",
|
||||
"char_4143_sensi": "센시",
|
||||
"char_4144_chilc": "칠책",
|
||||
"char_4147_mitm": "미틈",
|
||||
"char_4148_philae": "",
|
||||
"char_4151_tinman": "틴맨",
|
||||
"char_4155_talr": "",
|
||||
"char_4162_cathy": "캐서린",
|
||||
"char_4163_rosesa": "",
|
||||
"char_4164_tecno": "",
|
||||
"char_4171_wulfen": "",
|
||||
"char_4172_xingzh": "",
|
||||
"char_4173_nowell": "",
|
||||
"char_4177_brigid": "",
|
||||
"char_4178_alanna": ""
|
||||
},
|
||||
"6": {
|
||||
"char_003_kalts": "켈시",
|
||||
@@ -551,15 +573,25 @@
|
||||
"char_427_vigil": "비질",
|
||||
"char_430_fartth": "파투스",
|
||||
"char_437_mizuki": "미즈키",
|
||||
"char_450_necras": "",
|
||||
"char_456_ash": "Ash",
|
||||
"char_472_pasngr": "패신저",
|
||||
"char_474_glady": "글래디아",
|
||||
"char_479_sleach": "사일라흐",
|
||||
"char_485_pallas": "팔라스",
|
||||
"char_608_acpion": "",
|
||||
"char_609_acguad": "",
|
||||
"char_610_acfend": "",
|
||||
"char_611_acnipe": "",
|
||||
"char_612_accast": "",
|
||||
"char_613_acmedc": "",
|
||||
"char_614_acsupo": "",
|
||||
"char_615_acspec": "",
|
||||
"char_1012_skadi2": "스카디 더 커럽팅 하트",
|
||||
"char_1013_chen2": "첸 더 홀룽데이",
|
||||
"char_1014_nearl2": "니어 더 래디언트 나이트",
|
||||
"char_1016_agoat2": "에이야퍄들라 더 크비트 아스카",
|
||||
"char_1019_siege2": "비나 빅토리아",
|
||||
"char_1020_reed2": "리드 더 플레임 섀도우",
|
||||
"char_1023_ghost2": "스펙터 디 언체인드",
|
||||
"char_1026_gvial2": "가비알 디 인빈서블",
|
||||
@@ -570,6 +602,10 @@
|
||||
"char_1033_swire2": "스와이어 디 엘리건트 위트",
|
||||
"char_1034_jesca2": "제시카 더 리버레이티드",
|
||||
"char_1035_wisdel": "위셔델",
|
||||
"char_1038_whitw2": "",
|
||||
"char_1039_thorn2": "",
|
||||
"char_1040_blaze2": "",
|
||||
"char_1502_crosly": "",
|
||||
"char_2012_typhon": "티폰",
|
||||
"char_2013_cerber": "케오베",
|
||||
"char_2014_nian": "니엔",
|
||||
@@ -577,8 +613,11 @@
|
||||
"char_2023_ling": "링",
|
||||
"char_2024_chyue": "총웨",
|
||||
"char_2025_shu": "슈",
|
||||
"char_2026_yu": "",
|
||||
"char_4009_irene": "아이린",
|
||||
"char_4010_etlchi": "",
|
||||
"char_4011_lessng": "레싱",
|
||||
"char_4026_vulpis": "",
|
||||
"char_4027_heyak": "오올헤약",
|
||||
"char_4039_horn": "혼",
|
||||
"char_4042_lumen": "루멘",
|
||||
@@ -601,10 +640,11 @@
|
||||
"char_4132_ascln": "아스카론",
|
||||
"char_4133_logos": "로고스",
|
||||
"char_4134_cetsyr": "시빌라이트 에테르나",
|
||||
"char_4138_narant": "",
|
||||
"char_4141_marcil": "",
|
||||
"char_4145_ulpia": "",
|
||||
"char_4146_nymph": ""
|
||||
"char_4138_narant": "나란투야",
|
||||
"char_4141_marcil": "마르실",
|
||||
"char_4145_ulpia": "울피아누스",
|
||||
"char_4146_nymph": "님프",
|
||||
"char_4179_monstr": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,10 +328,19 @@
|
||||
"char_381_bubble": "泡泡",
|
||||
"char_385_finlpp": "清流",
|
||||
"char_440_pinecn": "松果",
|
||||
"char_445_wscoot": "骋风",
|
||||
"char_452_bstalk": "豆苗",
|
||||
"char_469_indigo": "深靛",
|
||||
"char_484_robrta": "罗比菈塔",
|
||||
"char_491_humus": "休谟斯",
|
||||
"char_600_cpione": "预备干员-先锋",
|
||||
"char_601_cguard": "预备干员-近卫",
|
||||
"char_602_cdfend": "预备干员-重装",
|
||||
"char_603_csnipe": "预备干员-狙击",
|
||||
"char_604_ccast": "预备干员-术师",
|
||||
"char_605_cmedic": "预备干员-医疗",
|
||||
"char_606_csuppo": "预备干员-辅助",
|
||||
"char_607_cspec": "预备干员-特种",
|
||||
"char_4004_pudd": "布丁",
|
||||
"char_4041_chnut": "褐果",
|
||||
"char_4062_totter": "铅踝",
|
||||
@@ -339,7 +348,8 @@
|
||||
"char_4067_lolxh": "罗小黑",
|
||||
"char_4100_caper": "跃跃",
|
||||
"char_4107_vrdant": "维荻",
|
||||
"char_4130_luton": "露托"
|
||||
"char_4130_luton": "露托",
|
||||
"char_4165_ctrail": "云迹"
|
||||
},
|
||||
"5": {
|
||||
"char_002_amiya": "阿米娅",
|
||||
@@ -440,6 +450,7 @@
|
||||
"char_476_blkngt": "夜半",
|
||||
"char_478_kirara": "绮良",
|
||||
"char_486_takila": "龙舌兰",
|
||||
"char_487_bobb": "波卜",
|
||||
"char_488_buildr": "青枳",
|
||||
"char_489_serum": "蚀清",
|
||||
"char_492_quercu": "夏栎",
|
||||
@@ -476,6 +487,7 @@
|
||||
"char_4043_erato": "埃拉托",
|
||||
"char_4045_heidi": "海蒂",
|
||||
"char_4047_pianst": "车尔尼",
|
||||
"char_4052_surfer": "寻澜",
|
||||
"char_4054_malist": "至简",
|
||||
"char_4066_highmo": "海沫",
|
||||
"char_4071_peper": "明椒",
|
||||
@@ -503,7 +515,17 @@
|
||||
"char_4143_sensi": "森西",
|
||||
"char_4144_chilc": "齐尔查克",
|
||||
"char_4147_mitm": "渡桥",
|
||||
"char_4151_tinman": "锡人"
|
||||
"char_4148_philae": "菲莱",
|
||||
"char_4151_tinman": "锡人",
|
||||
"char_4155_talr": "裁度",
|
||||
"char_4162_cathy": "凯瑟琳",
|
||||
"char_4163_rosesa": "瑰盐",
|
||||
"char_4164_tecno": "特克诺",
|
||||
"char_4171_wulfen": "钼铅",
|
||||
"char_4172_xingzh": "行箸",
|
||||
"char_4173_nowell": "诺威尔",
|
||||
"char_4177_brigid": "水灯心",
|
||||
"char_4178_alanna": "阿兰娜"
|
||||
},
|
||||
"6": {
|
||||
"char_003_kalts": "凯尔希",
|
||||
@@ -551,15 +573,25 @@
|
||||
"char_427_vigil": "伺夜",
|
||||
"char_430_fartth": "远牙",
|
||||
"char_437_mizuki": "水月",
|
||||
"char_450_necras": "死芒",
|
||||
"char_456_ash": "灰烬",
|
||||
"char_472_pasngr": "异客",
|
||||
"char_474_glady": "歌蕾蒂娅",
|
||||
"char_479_sleach": "琴柳",
|
||||
"char_485_pallas": "帕拉斯",
|
||||
"char_608_acpion": "郁金香",
|
||||
"char_609_acguad": "Sharp",
|
||||
"char_610_acfend": "Mechanist",
|
||||
"char_611_acnipe": "Stormeye",
|
||||
"char_612_accast": "Pith",
|
||||
"char_613_acmedc": "Touch",
|
||||
"char_614_acsupo": "Raidian",
|
||||
"char_615_acspec": "Misery",
|
||||
"char_1012_skadi2": "浊心斯卡蒂",
|
||||
"char_1013_chen2": "假日威龙陈",
|
||||
"char_1014_nearl2": "耀骑士临光",
|
||||
"char_1016_agoat2": "纯烬艾雅法拉",
|
||||
"char_1019_siege2": "维娜·维多利亚",
|
||||
"char_1020_reed2": "焰影苇草",
|
||||
"char_1023_ghost2": "归溟幽灵鲨",
|
||||
"char_1026_gvial2": "百炼嘉维尔",
|
||||
@@ -570,6 +602,10 @@
|
||||
"char_1033_swire2": "琳琅诗怀雅",
|
||||
"char_1034_jesca2": "涤火杰西卡",
|
||||
"char_1035_wisdel": "维什戴尔",
|
||||
"char_1038_whitw2": "荒芜拉普兰德",
|
||||
"char_1039_thorn2": "引星棘刺",
|
||||
"char_1040_blaze2": "烛煌",
|
||||
"char_1502_crosly": "弑君者",
|
||||
"char_2012_typhon": "提丰",
|
||||
"char_2013_cerber": "刻俄柏",
|
||||
"char_2014_nian": "年",
|
||||
@@ -577,8 +613,11 @@
|
||||
"char_2023_ling": "令",
|
||||
"char_2024_chyue": "重岳",
|
||||
"char_2025_shu": "黍",
|
||||
"char_2026_yu": "余",
|
||||
"char_4009_irene": "艾丽妮",
|
||||
"char_4010_etlchi": "隐德来希",
|
||||
"char_4011_lessng": "止颂",
|
||||
"char_4026_vulpis": "忍冬",
|
||||
"char_4027_heyak": "霍尔海雅",
|
||||
"char_4039_horn": "号角",
|
||||
"char_4042_lumen": "流明",
|
||||
@@ -604,7 +643,8 @@
|
||||
"char_4138_narant": "娜仁图亚",
|
||||
"char_4141_marcil": "玛露西尔",
|
||||
"char_4145_ulpia": "乌尔比安",
|
||||
"char_4146_nymph": "妮芙"
|
||||
"char_4146_nymph": "妮芙",
|
||||
"char_4179_monstr": "Mon3tr"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,26 +10,21 @@ heroFullScreen: true
|
||||
actions:
|
||||
- text: 简体中文
|
||||
link: ./zh-cn/
|
||||
icon: signs-post
|
||||
type: primary
|
||||
|
||||
- text: 繁體中文
|
||||
link: ./zh-tw/
|
||||
icon: signs-post
|
||||
type: primary
|
||||
|
||||
- text: English
|
||||
icon: lightbulb
|
||||
link: ./en-us/
|
||||
type: primary
|
||||
|
||||
- text: 日本語
|
||||
link: ./ja-jp/
|
||||
icon: signs-post
|
||||
type: primary
|
||||
|
||||
- text: 한국어
|
||||
link: ./ko-kr/
|
||||
icon: signs-post
|
||||
type: primary
|
||||
---
|
||||
|
||||
@@ -101,7 +101,7 @@ Visual Studio 起動後、Git 操作は「Git 変更」画面からコマンド
|
||||
|
||||
## Visual Studioでclang-formatを有効にする
|
||||
|
||||
1. clang-format バージョン17以上をインストールします。
|
||||
1. clang-format バージョン20.1.0以上をインストールします。
|
||||
|
||||
```bash
|
||||
python -m pip install clang-format
|
||||
|
||||
@@ -408,6 +408,7 @@ binary = true # 是否安装 maa-cli 的二进制文件,默认为 true
|
||||
# 资源热更新相关配置
|
||||
[resource]
|
||||
auto_update = true # 是否在每次运行任务时自动更新资源,默认为 false
|
||||
warn_on_update_failure = true # 是否在更新失败时发出警告而不是直接报错
|
||||
backend = "libgit2" # 资源热更新后端,可选值为 "git" 或者 "libgit2",默认为 "git"
|
||||
|
||||
# 资源热更新远程仓库相关配置
|
||||
|
||||
@@ -116,8 +116,6 @@ maa install
|
||||
|
||||
- Nix:
|
||||
|
||||
```bash
|
||||
nix-env -iA nixpkgs.maa-assistant-arknights
|
||||
```
|
||||
Nix 上的 maa-cli 强制依赖 MaaCore。 因此,Nix 用户无需,也不应该手动安装 MaaCore。
|
||||
|
||||
**注意**:只有使用包管理器安装 maa-cli 的用户才能使用包管理器安装 MaaCore,否则请使用 `maa install` 命令安装。此外,`maa install` 通过下载官方预编译的 MaaCore,而包管理器安装的 MaaCore 的编译选项和依赖版本与官方预编译的版本不同。这不会影响 maa-cli 的使用,但可能会导致 MaaCore 的功能和性能有所不同。比如,包管理器安装的 MaaCore 使用较新版本的 `fastdeploy`,而官方预编译的 MaaCore 使用较旧版本的 `fastdeploy`。而在新版本的 `fastdeploy` 中,日志可以被隐藏,这可以消除了一些不必要的日志输出。
|
||||
**注意**:只有使用包管理器安装 maa-cli 的用户才能使用包管理器安装 MaaCore,否则请使用 `maa install` 命令安装。此外,`maa install` 通过下载官方预编译的 MaaCore,而包管理器安装的 MaaCore 可能使用的编译选项和依赖版本与官方预编译的版本不同,这可能导致性能和功能上存在略微差异。
|
||||
|
||||
@@ -63,7 +63,7 @@ Mac 版の開発は人手不足のため、更新速度が比較的遅いです
|
||||
|
||||
### ✅ [NOX](https://www.yeshen.com/)
|
||||
|
||||
サポートされています。現在、 Ma cの MAAX バージョンはエミュレータの自動適応をサポートしていないため、MAAの `設定` - `接続設定` で、 `adb` に `127.0.0.1:62001`を接続する必要があり、ポートはデフォルトの` 5555 `ではないことに注意し、エミュレータポートに関する詳細な説明は[一般的なエミュレータadbポート](../faq.md#一般的なAndroidエミュレータのadbポート)を参照してください。
|
||||
サポートされています。
|
||||
|
||||
補足:mac の NOX の adb バイナリファイルの場所は `/Applications/NoxAppPlayer.app/Contents/MacOS/adb` 、親ディレクトリ `MacOS` の下で `adb devices` コマンドを使用してadbポートを表示できます。
|
||||
|
||||
|
||||
@@ -230,11 +230,6 @@ MAAはWindows UAC管理者権限なしで、すべての機能を実行できる
|
||||
|
||||
UACを無効にしたシステムでは、「右クリックして管理者として実行を選択しなくても、管理者権限で起動される」という問題が報告されています。意図しない権限昇格を避けるために、UACを有効にすることをお勧めします。
|
||||
|
||||
## ダウンロード速度が遅い、ミラーサイトにアクセスできない
|
||||
|
||||
[MAA ダウンロードステーション](https://ota.maa.plus/MaaAssistantArknights/MaaRelease/releases/download/) を使ってダウンロードしてください。
|
||||
我々の提供サーバーでは帯域幅が狭く、トラフィックも限られています。 githubや他のミラーサイトからダウンロードできる場合は、そちらを選択することをお勧めします。
|
||||
|
||||
## ダウンロードが中途半端になり "ログイン"/"認証 "のプロンプトが出る
|
||||
|
||||
- ファイルをダウンロードするには、ブラウザ/IDM/FDM やその他の通常のダウンローダーを使用してください。**Thunderを使うな!**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 3
|
||||
icon: hugeicons:brain-02
|
||||
---
|
||||
|
||||
# 刷理智
|
||||
@@ -21,6 +22,7 @@ This page is outdated and maybe still in Simplified Chinese. Translation is need
|
||||
- `吃源石` 只会在 `吃理智药` 之后判断,因为 MAA 只有在没有理智药时才会使用源石补充理智。所以在勾选 `吃源石` 之后,MAA 会将 `吃理智药` 的次数锁定为 999,确保将理智药吃光,以避免跳过 `吃源石` 判断。
|
||||
|
||||
::: details 例子
|
||||
|
||||
| 吃理智药 | 吃源石 | 指定次数 | 指定材料 | 结果 |
|
||||
| :------: | :----: | :------: | :------: | -------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| | | | | 刷完现有理智即结束。 |
|
||||
@@ -49,7 +51,7 @@ This page is outdated and maybe still in Simplified Chinese. Translation is need
|
||||
- 所有芯片本。必须输入完整关卡编号,如 `PR-A-1`。
|
||||
- 剿灭作战。必须输入 `Annihilation`。
|
||||
- 别传中的 `OF-1` / `OF-F3` / `GT-5`。
|
||||
- 当期 SS 活动 后三关。在自动访问 [API](https://ota.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) 下载更新后会在界面下方显示。
|
||||
- 当期 SS 活动 后三关。在自动访问 [API](https://api.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) 下载更新后会在界面下方显示。
|
||||
- 复刻的 SS 活动。输入 `SSReopen-<关卡前缀>` ,可一次性刷完 XX-1 ~ XX-9 关,如 `SSReopen-IC`。
|
||||
|
||||
::: details 画面例
|
||||
@@ -83,11 +85,21 @@ This page is outdated and maybe still in Simplified Chinese. Translation is need
|
||||
- 若剩余理智仍然不足则会结束任务(如少于 6 理智)。
|
||||
- 如果剩余理智选择关卡为未开放关卡,则刷理智任务出错。
|
||||
|
||||
### 连战次数
|
||||
### 連戦回数
|
||||
|
||||
- MAA 目前仅会按照用户设定的次数进行连战,尚未支持自动识别最大连战次数。
|
||||
- 若设置的次数过多但理智不足,MAA 会直接进行 `吃理智药` 或 `吃源石` 操作,并继续尝试连战。
|
||||
- 若未设置 `吃理智药` 或 `吃源石`,MAA 会直接认为理智不足,终止刷理智任务。若设置了 `剩余理智` ,MAA 会直接开始刷 `剩余理智` 关卡。
|
||||
MAAは、ユーザーが設定した連続戦闘回数に応じて戦闘を行います。
|
||||
|
||||
- **自動モード** (0):
|
||||
- レベル内の最大連続戦闘回数を自動で判別し、最大連続戦闘回数を維持し、正気度オーバーフローが発生しないようにします。
|
||||
- 完了後、「正気度残量確認」プロセスに入ります(設定されている場合)。
|
||||
|
||||
- **数値モード** (1~6):
|
||||
- 設定された回数だけ連続戦闘を行います。
|
||||
- 現在の正気度が設定回数を完了するのに足りない場合(例えば、5回しか完了できないのに6回に設定している場合)、タスクを終了し、「正気度残量確認」プロセスに入ります(設定されている場合)。
|
||||
|
||||
- **無効モード** (-1):
|
||||
- ゲーム内の連続戦闘回数を調整しません。
|
||||
- 現在の正気度が設定回数を完了するのに足りない場合、タスクを終了し、「正気度残量確認」プロセスに入ります(設定されている場合)。
|
||||
|
||||
### 掉落识别
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 9
|
||||
icon: ph:sword-bold
|
||||
---
|
||||
|
||||
# 自动战斗
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 5
|
||||
icon: solar:shop-2-bold
|
||||
---
|
||||
|
||||
# 获取信用及购物
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 4
|
||||
icon: material-symbols:view-quilt-rounded
|
||||
---
|
||||
|
||||
# 基建换班
|
||||
@@ -22,7 +23,7 @@ This page is outdated and maybe still in Simplified Chinese. Translation is need
|
||||
- 不可识别并使用的例子:`迷迭香体系`、`红松骑士团`。
|
||||
- 若 `无人机用途` 选择 `贸易站-龙门币` ,则会额外识别 `巫恋组` 并优先为其使用。
|
||||
- 会客室仅缺一个线索时,会选择对应线索倾向的干员,其余情况选择通用干员。
|
||||
- 会客室仅当自有线索满时才会送出线索,并且只送三个。如需自定义单次送线索个数可修改 MAA 文件夹下 `resource/tasks.json` 中的 `SelectClue` - `maxTimes` 字段。
|
||||
- 会客室仅当自有线索满时才会送出线索,并且只送三个。如需自定义单次送线索个数可修改 MAA 文件夹下 `resource/tasks/tasks.json` 中的 `ClueSelected` - `maxTimes` 字段。
|
||||
- 开启 `不将已进驻的干员放入宿舍` 设置项可避免 `艾丽妮`、`逻各斯` 等干员在训练室未训练时被进驻到宿舍,但同时也不会将加工站中心情不满的干员进驻宿舍。
|
||||
- 控制中枢策略太过复杂,目前只考虑 `阿米娅`、`诗怀雅`、`凯尔希`、`彩虹小队` 及其他心情 +0.05 的干员,后续逐步优化。
|
||||
- 可自行选择需要 MAA 处理的设施类别,默认全选。
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 7
|
||||
icon: ri:game-fill
|
||||
---
|
||||
|
||||
# 自动肉鸽
|
||||
|
||||
@@ -18,7 +18,7 @@ icon: ic:baseline-article
|
||||
- SoCの場合のみ、完全なステージ番号を入力する必要があります。例: `PR-A-1` 。
|
||||
- `Annihilation`(殲滅作戦)。
|
||||
- `OF-1` / `OF-F3` / `GT-5` のみサポートされます。
|
||||
- 現在のSSイベントの最後の3つのステージ。 [API](https://ota.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) で更新が自動的にダウンロードされた後、メイン画面に対応するメッセージが表示されます。
|
||||
- 現在のSSイベントの最後の3つのステージ。 [API](https://api.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json) で更新が自動的にダウンロードされた後、メイン画面に対応するメッセージが表示されます。
|
||||
- 再刻印SSアクティビティは `SSReopen-XX` と入力するとXX-1~XX-9ステージを一度にクリアできます。 `SSReopen-IC` など。
|
||||
|
||||
::: details 画面例
|
||||
@@ -79,13 +79,13 @@ icon: ic:baseline-article
|
||||
- `ロスモンティス`、`レッドパイン騎士団(フレイムテイル/ファートゥース/ワイルドメイン/アッシュロック)` などの多くの施設間で連携する組合せは一時的にサポートできません。
|
||||
- `ドローンの使用` で `貿易所-龍門幣` を選択した場合。 `シャマレの組合せ` があるかどうかを識別し、優先的に使用します。
|
||||
- 応接室の手がかりが1つだけ欠けている場合は、該当するスキルのあるオペレーターが選ばれ、そうでない場合は一般オペレーターが選ばれます。
|
||||
- 応接室は自分の手がかりが溢れた際、手がかり3つのみを譲り渡します。必要な場合、`resource/tasks.json` の `SelectClue` - `maxTimes` フィールドを変更して、譲渡する数をカスタマイズできます。
|
||||
- 応接室は自分の手がかりが溢れた際、手がかり3つのみを譲り渡します。必要な場合、`resource/tasks/tasks.json` の `ClueSelected` - `maxTimes` フィールドを変更して、譲渡する数をカスタマイズできます。
|
||||
- 訓練所を使用していない場合 `アイリーニ` などのオペレーターを宿舎に移動させたくない場合は、設定で `作業中のオペレーターを宿舎に移動しない` にチェックしてください。 ただし、この場合、疲労が蓄積していないオペレータも宿舎に入れなくなる可能性があります。
|
||||
- 制御中枢のストラテジーが複雑すぎるため。現在では `アーミヤ` `スワイヤー` `ケルシー` `レインボー小隊` および体力値が+0.05のスキルのオペレーターのみが考慮されており、今後徐々に最適化される予定です。
|
||||
|
||||
### カスタム基地設定(テスト中)
|
||||
|
||||
- [Yituliu](https://ark.yituliu.cn/)のエキスパートが、基地シフトをドキュメントでエクスポートできる[ジェネレーター](https://ark.yituliu.cn/tools/schedule)の作成に協力しました。[ドキュメント](../プロトコルドキュメント/基地シフトAPI.md)を参照して使用できます。
|
||||
- [Yituliu](https://ark.yituliu.cn/)のエキスパートが、基地シフトをドキュメントでエクスポートできる[ジェネレーター](https://ark.yituliu.cn/tools/schedule)の作成に協力しました。[ドキュメント](../../protocol/base-scheduling-schema.md)を参照して使用できます。
|
||||
- `/resource/custom_infrast/`のフォルダに、非常に効率的なタスクのセットがいくつか組み込まれており、参考として使用することができます。(昇進2の該当オペレーターがいれば、直接使用可能です。)
|
||||
|
||||
### FPと購買部
|
||||
@@ -149,7 +149,7 @@ icon: ic:baseline-article
|
||||
|
||||
#### 攻略ファイルの作成
|
||||
|
||||
- [ジョブエディター](https://prts.plus/create)を使用して作成してください、[自動戦闘API](../プロトコルドキュメント/自動戦闘API.md)を参照してください。
|
||||
- [ジョブエディター](https://prts.plus/create)を使用して作成してください、[自動戦闘API](../../protocol/copilot-schema.md)を参照してください。
|
||||
- マップ座標の取得:
|
||||
- ジョブエディターでステージ名を入力すると、ドラッグ可能な座標マップが左下隅に自動的にロードされ、クリックして現在のオペレーターの位置を設定できます。
|
||||
- ステージ名を入力して JSON をエクスポートすると、直接行動開始され、座標情報で覆われたマップのスクリーンショットが MAA ディレクトリの `debug\map` ディレクトリに生成されます。
|
||||
@@ -175,7 +175,7 @@ Windows MAAには `設定` タブの他に `タスク設定` もあります。
|
||||
|
||||
#### adbパスの取得
|
||||
|
||||
- [エミュレータの組み込みadb](./よくある質問.md#adbと接続アドレスが正しいことを確認する) を使用するか、 [adb](https://dl.google.com/android/repository/platform-tools-latest-windows.zip) を自分でダウンロードして解凍します。
|
||||
- [エミュレータの組み込みadb](../../manual/faq.md#adbと接続アドレスが正しいことを確認する) を使用するか、 [adb](https://dl.google.com/android/repository/platform-tools-latest-windows.zip) を自分でダウンロードして解凍します。
|
||||
- ソフトウェアの `設定` - `接続設定` に進み、`adb.exe`のファイルパスを選択し、adbアドレス(IP +ポートを入力する必要があります。例:`127.0.0.1:5555`)を記入し、エミュレータのタイプを選択します。
|
||||
|
||||
#### ポート番号の取得
|
||||
@@ -213,7 +213,7 @@ Windows MAAには `設定` タブの他に `タスク設定` もあります。
|
||||
### マルチインスタンスでのエミュレータの自動起動
|
||||
|
||||
- 複数のエミュレータを同時に操作する必要がある場合は、MAAフォルダを複製し、**別のMAA**、**同じadb.exe**、**異なる接続アドレス**を使用して接続します。
|
||||
- **[BlueStacks International Version](./エミュレータのサポート/Windowsでのエミューレータ.md#✅-Bluestacks-5(おすすめ👍))を例にして**、2つのマルチインスタンスでのエミュレータ起動方法を紹介します。
|
||||
- **[BlueStacks International Version](../../manual/device/windows.md#-完全サポート)を例にして**、2つのマルチインスタンスでのエミュレータ起動方法を紹介します。
|
||||
|
||||
#### エミュレータexeにコマンドを付加することによるマルチインスタンスを実行する方法
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 11
|
||||
icon: icon-park-solid:other
|
||||
---
|
||||
|
||||
# 其他
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 8
|
||||
icon: solar:streets-map-point-linear
|
||||
---
|
||||
|
||||
# 生息演算
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 2
|
||||
icon: fluent:people-24-filled
|
||||
---
|
||||
|
||||
# 公开招募
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 6
|
||||
icon: lucide:gift
|
||||
---
|
||||
|
||||
# 领取奖励
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 1
|
||||
icon: ic:round-rocket-launch
|
||||
---
|
||||
|
||||
# 开始唤醒
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 10
|
||||
icon: octicon:tools-16
|
||||
---
|
||||
|
||||
# ツールボックス
|
||||
|
||||
@@ -86,6 +86,7 @@ JSONファイルはコメントをサポートしていません。テキスト
|
||||
1. 既存のグループの紹介
|
||||
|
||||
ファントムテーマを例に取ると:主にオペレーターを以下のように分類しています
|
||||
|
||||
| グループ | 主な考慮事項 | 主に職種を含む | オペレーターの例 |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| **_地面阻挡_** | 場に立つことと雑魚を清掃 | 重装、前衛 | 庇護衛士、基石、ラ・プルマ、マウンテン、M3、リィンとシーンの召喚ユニット、スポット、重装予備隊員 |
|
||||
@@ -100,6 +101,7 @@ JSONファイルはコメントをサポートしていません。テキスト
|
||||
2. 特別な操作が必要なグループ
|
||||
|
||||
上記のような一般的なグループ以外に、時折、特定のオペレーターやオペレーターの種類に対して細かいカスタマイズが必要な場合があります。例えば
|
||||
|
||||
| グループ | 含まれるオペレーター | 主な特徴 |
|
||||
| :--- | :--- | :--- |
|
||||
| 棘刺 | ソーンズ、ホルン | 地上遠隔攻撃、特定の位置に非常に適したマップがあります |
|
||||
|
||||
@@ -84,8 +84,11 @@ TaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const char* p
|
||||
"medicine": int, // 理性回復剤の最大使用数、オプション、デフォルトは 0
|
||||
"expiring_medicine": int, // 48 時間以内に期限切れになった理性回復剤の最大使用数、オプション、デフォルトは 0
|
||||
"stone": int, // 純正源石の最大使用数、オプション、デフォルトは 0
|
||||
"times": int, // 最大周回数、オプション、デフォルトは無限
|
||||
"times": int, // 最戦闘回数、オプション、デフォルトは無限
|
||||
"series": int, // 連戦回数、オプション、1~6
|
||||
// -1 シリーズの切り替えを無効にするには
|
||||
// 0 現在利用可能なシリーズ数の最大数に自動的に切り替えるには、現在のサニティが6回未満の場合は、利用可能な最小回数を選択します.
|
||||
// 1~6 指定した回数に変更するには
|
||||
"drops": { // ドロップ数の指定、オプション、デフォルトは指定なし
|
||||
"30011": int, // Key: item_ID; value: 素材の数。Keyは resource/item_index.json に記載されています
|
||||
"30062": int // OR 組み合わせ
|
||||
@@ -156,6 +159,7 @@ TaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const char* p
|
||||
"mode": int, // シフトモード、オプション、デフォルトは 0。
|
||||
// 0 - デフォルトのシフト モード、単一施設の最適解
|
||||
// 10000 - シフト変更モードをカスタマイズし、ユーザー構成を読み取り、プロトコルドキュメント/インフラストシフト.md を参照してください
|
||||
// 20000 - ローテーション: ワンキーローテーションモード。コントロールセンター、発電所、寮、オフィスをスキップします。他の施設はシフトを変更しませんが、基本的な操作は保持されます (ドローンの使用、応接室のロジックなど)
|
||||
"facility": [ // シフト対象施設(順序付け)、必須。動作中の編集はサポートされていません.
|
||||
string, // 施設名: "Mfg" | "Trade" | "Power" | "Control" | "Reception" | "Office" | "Dorm"
|
||||
...
|
||||
|
||||
@@ -5,7 +5,7 @@ icon: material-symbols:task
|
||||
|
||||
# タスク フロー プロトコル
|
||||
|
||||
`resource/tasks.json` の使用方法と各フィールドの説明
|
||||
`resource/tasks` の使用方法と各フィールドの説明
|
||||
|
||||
::: tip
|
||||
JSONファイルはコメントをサポートしていません。テキスト内のコメントはプレゼンテーション用にのみ使用されます。直接コピーして使用しないでください。
|
||||
@@ -104,7 +104,7 @@ JSONファイルはコメントをサポートしていません。テキスト
|
||||
// その場合、 "maskRange" を [ 1, 255 ] に設定して、マッチング時に黒く塗りつぶされた部分を瞬時に無視できます。
|
||||
|
||||
"colorScales": [ // method が HSVCount または RGBCount の場合に有効で必須、色マスク範囲。
|
||||
[ // list<array<array<int, 3>, 2> | array<int, 2>>
|
||||
[ // list<array<array<int, 3>, 2>> / list<array<int, 2>>
|
||||
[23, 150, 40], // 構造は [[lower1, upper1], [lower2, upper2], ...]
|
||||
[25, 230, 150] // 内側が int の場合はグレースケール、
|
||||
], // array<int, 3> の場合は三チャネルの色で、method によって RGB または HSV かが決まります;
|
||||
@@ -140,12 +140,28 @@ JSONファイルはコメントをサポートしていません。テキスト
|
||||
"isAscii": false, // オプション、認識されるテキストコンテンツが ASCII 文字であるかどうか
|
||||
// 指定されていない場合、デフォルトはfalse
|
||||
|
||||
"withoutDet": false // オプション、検出モデルを使用しない場合
|
||||
"withoutDet": false, // オプション、検出モデルを使用しない場合
|
||||
// 指定されていない場合、デフォルトは false
|
||||
|
||||
/* 以下のフィールドは、algorithmがHashの場合にのみ有効です */
|
||||
// アルゴリズムが未熟であり、特殊な場合にのみ使用されるため、現時点では推奨されていません
|
||||
// Todo
|
||||
|
||||
/* 以下のフィールドは、アルゴリズムが FeatureMatch の場合のみ有効です */
|
||||
|
||||
"template": "xxx.png", // オプション。マッチングする画像ファイル名。文字列または文字列リストを指定できます。
|
||||
// デフォルトは "taskname.png"
|
||||
|
||||
"count": 4, // マッチングする特徴点の数(閾値)。デフォルト値は 4
|
||||
|
||||
"ratio": 0.6, // KNN マッチングアルゴリズムの距離比。[0 - 1.0]。比率が大きいほどマッチングが緩くなり、接続されやすくなります。デフォルトは 0.6
|
||||
|
||||
"detector": "SIFT", // 特徴点検出の種類。オプションの値は SIFT、ORB、AKAZE、SURF。デフォルト値は SIFT
|
||||
// SIFT: 計算量が多い、スケール不変性、回転不変性。最も効果的。
|
||||
// ORB: 計算速度が非常に速い、回転不変性。ただし、スケール不変性は保証されません。
|
||||
// BRISK: 非常に高速な計算速度、スケール不変性、回転不変性を備えています。
|
||||
// KAZE: 2Dおよび3D画像に適用可能、スケール不変性、回転不変性を備えています。
|
||||
// AKAZE: 高速な計算速度、スケール不変性、回転不変性を備えています。
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -88,7 +88,7 @@ MAA はコマンドラインインタフェース(CLI)操作をサポート
|
||||
- 新しいFramework: [MaaFramework](https://github.com/MaaAssistantArknights/MaaFramework)
|
||||
- [作業シェアサイト](https://prts.plus):[フロントエンド](https://github.com/MaaAssistantArknights/maa-copilot-frontend)
|
||||
- バックエンド:[MaaBackendCenter](https://github.com/MaaAssistantArknights/MaaBackendCenter)
|
||||
- [公式ウェブサイト](https://www.maa.plus): [フロントエンド](https://github.com/MaaAssistantArknights/MaaAssistantArknights/tree/dev/website)
|
||||
- [公式ウェブサイト](https://maa.plus): [フロントエンド](https://github.com/MaaAssistantArknights/MaaAssistantArknights/tree/dev/website)
|
||||
- Deep Learning: [MaaAI](https://github.com/MaaAssistantArknights/MaaAI)
|
||||
|
||||
### 多言語 (i18n)
|
||||
@@ -183,7 +183,7 @@ MAAをより良くするために開発・テストに貢献してくれたす
|
||||
|
||||
## 免責事項
|
||||
|
||||
- 本ソフトウェアは [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html) オープンソースライセンスを使用しています。
|
||||
- 本ソフトウェアは [GNU Affero General Public License v3.0 only](https://spdx.org/licenses/AGPL-3.0-only.html) オープンソースライセンスを使用しています、また追加の [ユーザー規約](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev/terms-of-service.md) が付属しています。
|
||||
- 本ソフトウェアのロゴはAGPL 3.0ライセンスを使用しており、オープンソースではなく、[耗毛](https://weibo.com/u/3251357314)とVie、2人のアーティストと開発者がすべての権利を留保しています。「AGPL 3.0ライセンスに基づいて許可されている」という理由で、許可がない場合に本ソフトウェアのロゴを無断で使用することは禁止しております。また、許可なく商業目的で本ソフトウェアのロゴを無断で使用することも禁止しております。
|
||||
- 本ソフトウェアはオープンソースで無料であり、学習と研究のみの目的としています。販売者が本ソフトウェアの料金を請求する場合は、デバイスや時間の料金である可能性があります。発生した問題と結果は、本ソフトウェアとは一切関係ありません。
|
||||
|
||||
@@ -193,7 +193,7 @@ MAAをより良くするために開発・テストに貢献してくれたす
|
||||
|
||||
## 広告
|
||||
|
||||
ユーザー研究グループQQグループ:[QQグループ](https://ota.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
|
||||
ユーザー研究グループQQグループ:[QQグループ](https://api.maa.plus/MaaAssistantArknights/api/qqgroup/index.html)
|
||||
Discord サーバー: [Discord 招待リンク](https://discord.gg/23DfZ9uA4V)
|
||||
ユーザー研究グループTGグループ:[Telegram](https://t.me/+Mgc2Zngr-hs3ZjU1)
|
||||
自動作戦JSON作業シェア:[prts.plus](https://prts.plus)
|
||||
|
||||
@@ -128,7 +128,7 @@ MAA는 리포지토리의 코드 및 리소스 파일들을 아름답고 일관
|
||||
|
||||
## Visual Studio에서 clang-format 사용 설정
|
||||
|
||||
1. clang-format 17 또는 그 이상 버전을 설치합니다.
|
||||
1. clang-format 20.1.0 또는 그 이상 버전을 설치합니다.
|
||||
|
||||
```bash
|
||||
python -m pip install clang-format
|
||||
|
||||
@@ -401,6 +401,7 @@ binary = true # maa-cli 바이너리 파일을 설치할지 여부, 기본값은
|
||||
# 리소스 핫 업데이트 관련 설정
|
||||
[resource]
|
||||
auto_update = true # 각 작업 실행 시 리소스를 자동 업데이트할지 여부, 기본값은 false
|
||||
warn_on_update_failure = true # 업데이트 실패 시 오류를 바로 보고하지 않고 경고를 발행할지 여부
|
||||
backend = "libgit2" # 리소스 핫 업데이트 백엔드, 가능한 값은 "git" 또는 "libgit2", 기본값은 "git"
|
||||
|
||||
[resource.remote]
|
||||
|
||||
@@ -112,8 +112,6 @@ maa install
|
||||
|
||||
- Nix:
|
||||
|
||||
```bash
|
||||
nix-env -iA nixpkgs.maa-assistant-arknights
|
||||
```
|
||||
Nix의 maa-cli는 MaaCore에 대한 필수 종속성이 있습니다. 따라서 Nix 사용자는 MaaCore를 수동으로 설치할 필요가 없으며, 설치해서도 안 됩니다.
|
||||
|
||||
**주의**: 패키지 관리자를 통해 maa-cli를 설치한 경우에만 패키지 관리자를 통해 MaaCore를 설치할 수 있습니다. 그렇지 않으면 `maa install` 명령어를 사용해야 합니다. 또한, `maa install` 명령어는 공식적으로 사전 컴파일된 MaaCore를 다운로드합니다. 패키지 관리자를 통해 설치된 MaaCore는 컴파일 옵션과 종속성 버전이 공식 사전 컴파일 버전과 다를 수 있습니다. 이는 maa-cli의 사용에 영향을 미치지 않지만, MaaCore의 기능과 성능에 차이가 있을 수 있습니다. 예를 들어, 패키지 관리자를 통해 설치된 MaaCore는 최신 버전의 `fastdeploy`를 사용하고, 공식 사전 컴파일된 MaaCore는 구버전의 `fastdeploy`를 사용합니다. 최신 버전의 `fastdeploy`에서는 로그를 숨길 수 있어 불필요한 로그 출력을 줄일 수 있습니다.
|
||||
**주의**: 패키지 관리자를 통해 maa-cli를 설치한 경우에만 패키지 관리자를 통해 MaaCore를 설치할 수 있습니다. 그렇지 않으면 `maa install` 명령어를 사용해야 합니다. 또한, `maa install` 명령어는 공식적으로 사전 컴파일된 MaaCore를 다운로드합니다. 패키지 관리자를 통해 설치된 MaaCore는 컴파일 옵션과 종속성 버전이 공식 사전 컴파일 버전과 다를 수 있습니다. 이는 maa-cli의 사용에 영향을 미치지 않지만, MaaCore의 기능과 성능에 차이가 있을 수 있습니다.
|
||||
|
||||
@@ -63,7 +63,7 @@ Mac 버전 개발에 인력이 부족하여 업데이트 속도가 비교적 느
|
||||
|
||||
### ✅ [녹스 에뮬레이터](https://www.yeshen.com/)
|
||||
|
||||
완벽하게 지원됩니다. 현재 Mac의 MAAX 버전은 에뮬레이터 자동 감지 기능을 지원하지 않으므로 MAA 설정 - 연결 설정에서 adb를 사용하여 127.0.0.1:62001에 연결해야 합니다. 포트가 기본 5555가 아니라는 점에 유의하세요. 에뮬레이터 포트에 대한 자세한 설명은 [에뮬레이터 포트](../faq.md#adb-및-연결-주소-확인)를 참조하세요.
|
||||
완벽하게 지원됩니다.
|
||||
|
||||
추가로, macOS에서 녹스 에뮬레이터의 adb 이진 파일의 위치는 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb`이며 부모 디렉토리 `MacOS`에서 `adb devices` 명령을 사용하여 adb 포트를 확인할 수 있습니다.
|
||||
|
||||
|
||||
@@ -230,12 +230,6 @@ MAA는 Windows UAC 관리자 권한 없이 모든 기능을 실행할 수 있어
|
||||
|
||||
UAC가 비활성화된 시스템에서는 "우클릭하여 관리자 권한으로 실행을 선택하지 않아도 관리자 권한으로 실행되는" 문제가 발생할 수 있다는 보고가 있습니다. 예상치 못한 권한 상승을 방지하기 위해 UAC를 활성화하는 것이 좋습니다.
|
||||
|
||||
## 파일 다운로드 속도가 느립니다
|
||||
|
||||
[MAA 다운로드 사이트](https://ota.maa.plus/MaaAssistantArknights/MaaRelease/releases/download/)에서 다운로드 하세요.
|
||||
|
||||
우리의 서버는 대역폭이 낮고 트래픽이 제한됩니다. 사용하기 위해 만들어졌지만 너무 남용하지 마세요. GitHub 또는 다른 미러 사이트에서 정상적으로 다운로드할 수 있는 경우 거기에서 먼저 시도해보세요.
|
||||
|
||||
## 중간에 다운로드 중 "로그인"/"인증" 메시지가 표시됩니다
|
||||
|
||||
브라우저 / IDM / FDM 등의 다운로드 관리자를 사용하여 파일을 다운로드하세요. **위쳐를 사용하지 마세요!**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 3
|
||||
icon: hugeicons:brain-02
|
||||
---
|
||||
|
||||
# 이성 사용 (Combat)
|
||||
@@ -17,6 +18,7 @@ order: 3
|
||||
- `순오리지늄`은 `이성 회복제` 이후에만 판단하므로 MAA는 이성 회복제가 없는 경우에만 이성을 보충합니다. 그래서 `순오리지늄`을 선택한 경우, `이성 회복제`의 사용 횟수를 보유하고 있는 `이성 회복제`보다 더 많이 설정해야 합니다!
|
||||
|
||||
::: details 예시
|
||||
|
||||
| 이성 회복제 | 순오리지늄 | 횟수 제한 | 드롭 제한 | 결과 |
|
||||
| :---------: | :--------: | :-------: | :-------: | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| | | | | 보유한 이성을 소모하고 정지합니다. |
|
||||
@@ -45,7 +47,7 @@ order: 3
|
||||
- 모든 칩 스테이지. 완전한 스테이지 코드를 입력해야 합니다. 예: `PR-A-1`.
|
||||
- 섬멸 작전. `Annihilation`을 입력해야 합니다.
|
||||
- 상시 개방 이벤트의 경우 `OF-1`/`OF-F3`/`GT-5`와 같이 입력합니다.
|
||||
- 현재 개방된 사이드 스토리 이벤트의 세 개의 스테이지입니다. [API](https://ota.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json)에서 업데이트를 자동으로 다운로드 한 후 화면 하단에 표시됩니다.
|
||||
- 현재 개방된 사이드 스토리 이벤트의 세 개의 스테이지입니다. [API](https://api.maa.plus/MaaAssistantArknights/api/gui/StageActivity.json)에서 업데이트를 자동으로 다운로드 한 후 화면 하단에 표시됩니다.
|
||||
- 재개방된 사이드 스토리 이벤트. `SSReopen-<스테이지 접두사>`를 입력하면 XX-1~XX-9 스테이지를 한 번에 완료할 수 있습니다. 예: `SSReopen-IC`.
|
||||
|
||||
::: details 예시 화면
|
||||
@@ -81,9 +83,19 @@ order: 3
|
||||
|
||||
### 연속 전투 횟수
|
||||
|
||||
- 현재 MAA는 사용자가 설정한 횟수만큼 연속 전투를 진행하며, 최대 연속 전투 횟수를 자동으로 인식하는 기능은 아직 지원되지 않습니다.
|
||||
- 설정된 횟수가 많지만 이성이 부족한 경우, MAA는 직접적으로 `이성 회복제 사용` 또는 `순오리지늄 사용`을 수행하고 계속해서 연속 전투를 시도합니다.
|
||||
- 만약 `이성 회복제 사용` 또는 `순오리지늄 사용`이 설정되어 있지 않은 경우, MAA는 이성이 부족하다고 판단하고 이성 사용을 종료합니다. 만약 `남은 이성`이 설정되어 있다면, MAA는 바로 `남은 이성` 스테이지를 시작합니다.
|
||||
MAA는 사용자가 설정한 연속 전투 횟수에 따라 전투를 진행합니다.
|
||||
|
||||
- **자동 모드** (0):
|
||||
- 레벨 내 최대 연속 전투 횟수를 자동으로 파악하고, 최대 연속 전투 횟수를 유지하며, 정신력을 초과하지 않습니다.
|
||||
- 완료 후 `잔여 정신력` 프로세스 시작(설정된 경우)
|
||||
|
||||
- **숫자 모드** (1~6):
|
||||
- 설정된 횟수에 따라 연속 전투를 진행합니다.
|
||||
- 현재 정신력이 설정된 횟수를 완료하기에 충분하지 않은 경우(예: 5회만 가능하지만 6회로 설정된 경우), 작업을 바로 종료하고 `잔여 정신력` 프로세스(설정된 경우)를 시작합니다.
|
||||
|
||||
- **비활성 모드** (-1):
|
||||
- 게임 내 연속 전투 횟수를 조정하지 않습니다.
|
||||
- 정신력이 현재 설정된 횟수를 완료하기에 충분하지 않은 경우 작업을 바로 종료하고 `잔여 정신력` 프로세스(설정된 경우)를 시작합니다.
|
||||
|
||||
### 드롭 인식
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 9
|
||||
icon: ph:sword-bold
|
||||
---
|
||||
|
||||
# Copilot (자동 전투)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 5
|
||||
icon: solar:shop-2-bold
|
||||
---
|
||||
|
||||
# 크레딧 상점
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
---
|
||||
order: 4
|
||||
icon: material-symbols:view-quilt-rounded
|
||||
---
|
||||
|
||||
# 기반시설
|
||||
@@ -17,7 +18,7 @@ order: 4
|
||||
- 만약 다중 시설간 조합을 원할 경우, `커스텀 기반시설`을 이용하세요.
|
||||
- `드론 사용처`가 `무역소-용문폐`로 지정되어 있을 경우, `샤마르`를 인식하고 드론을 아껴둘 것입니다.
|
||||
- 응접실에서 단 한 종류의 단서가 부족하다면 해당 진영의 오퍼레이터가 선택됩니다. 그렇지 않은 경우 일반적인 오퍼레이터가 선택됩니다.
|
||||
- 응접실이 꽉 차 있을 때만 단서를 내보낼 것입니다. 최대 3개의 단서가 전달됩니다. `resource/tasks.json`에서 `SelectClue`-`maxTimes` 필드를 수정해 단서의 전달 개수를 조절할 수 있습니다.
|
||||
- 응접실이 꽉 차 있을 때만 단서를 내보낼 것입니다. 최대 3개의 단서가 전달됩니다. `resource/tasks/tasks.json`에서 `ClueSelected`-`maxTimes` 필드를 수정해 단서의 전달 개수를 조절할 수 있습니다.
|
||||
- `아이린`이나 다른 오퍼레이터가 당장 업무 중이 아니라는 이유로 숙소로 보내지는 것을 원치 않는다면, `이미 배치된 오퍼레이터를 숙소에 넣지 않기` 옵션을 활성화할 수 있습니다. 단, 컨디션이 0이 아닌 한 어떤 오퍼레이터도 숙소로 들어오지 못하게 되는 문제를 불러올 수도 있습니다.
|
||||
- 제어 센터의 복잡성으로 인해서, `아미야`, `스와이어`, `켈시`, `레인보우 팀`과 기타 시간당 컨디션 +0.05 오퍼레이터만이 고려됩니다. 향후 개선될 예정입니다.
|
||||
- 몇몇 이격 오퍼레이터로 인한 충돌이 발생할 수 있습니다. UI에 오퍼레이터 충돌 경고가 있는지 확인하시고, 경고가 있다면 기반시설의 상태를 수동으로 확인하여 적절하게 배치해 주세요. (예시: 특정 시설이 완전히 비어 있을 수 있음)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user