MCPcopy Create free account
hub / github.com/Project-LemonLime/Project_LemonLime / read

Method read

src/base/LemonConfig.cpp:15–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace Lemon::base::config {
14
15 int LemonConfigJudge::read(const QJsonObject &json) {
16 READ_JSON(json, defaultFullScore);
17 READ_JSON(json, defaultTimeLimit);
18 READ_JSON(json, defaultMemoryLimit);
19 READ_JSON(json, compileTimeLimit);
20 READ_JSON(json, specialJudgeTimeLimit);
21 READ_JSON(json, fileSizeLimit);
22 READ_JSON(json, rejudgeTimes);
23 READ_JSON(json, maxJudgingThreads);
24
25 READ_JSON(json, defaultInputFileExtension);
26 READ_JSON(json, defaultOutputFileExtension);
27 READ_JSON(json, diffPath);
28
29 READ_JSON(json, inputFileExtensions);
30 READ_JSON(json, outputFileExtensions);
31 READ_JSON(json, recentContest);
32
33 // CompilerList
34 if (json.contains("compilerList") && json["compilerList"].isArray()) {
35 QJsonArray _compilerList = json["compilerList"].toArray();
36 compilerList.clear();
37 compilerList.reserve(_compilerList.size());
38 for (int i = 0; i < _compilerList.size(); ++i) {
39 QJsonObject compilerObject = _compilerList[i].toObject();
40 Compiler *compiler = new Compiler;
41 if (compiler->read(compilerObject) == -1)
42 return -1;
43 compilerList.append(compiler);
44 }
45 } else
46 return -1;
47 return 0;
48 }
49
50 void LemonConfigJudge::write(QJsonObject &json) const {
51 WRITE_JSON(json, defaultFullScore);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected