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

Method readFromStream

src/core/task.cpp:386–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386void Task::readFromStream(QDataStream &in) {
387 int tmp = 0;
388 int count = 0;
389 in >> problemTitle;
390 in >> sourceFileName;
391 in >> inputFileName;
392 in >> outputFileName;
393 in >> standardInputCheck;
394 in >> standardOutputCheck;
395 in >> tmp;
396 taskType = TaskType(tmp & 0xFF);
397 subFolderCheck = tmp >> 8;
398 in >> tmp;
399 comparisonMode = ComparisonMode(tmp);
400 in >> diffArguments;
401 in >> realPrecision;
402 in >> specialJudge;
403 specialJudge.replace('/', QDir::separator());
404
405 if (taskType == Task::Interaction) {
406 in >> interactor;
407 interactor.replace('/', QDir::separator());
408 in >> grader;
409 grader.replace('/', QDir::separator());
410 in >> interactorName;
411 }
412
413 if (taskType == Task::Communication || taskType == Task::CommunicationExec) {
414 int length = 0;
415 in >> length;
416 sourceFilesPath.clear();
417 sourceFilesName.clear();
418
419 for (int i = 0; i < length; i++) {
420 QString temp;
421 in >> temp;
422 temp.replace('/', QDir::separator());
423 sourceFilesPath.append(temp);
424 in >> temp;
425 temp.replace('/', QDir::separator());
426 sourceFilesName.append(temp);
427 }
428
429 in >> length;
430 graderFilesPath.clear();
431 graderFilesName.clear();
432
433 for (int i = 0; i < length; i++) {
434 QString temp;
435 in >> temp;
436 temp.replace('/', QDir::separator());
437 graderFilesPath.append(temp);
438 in >> temp;
439 temp.replace('/', QDir::separator());
440 graderFilesName.append(temp);
441 }
442 }
443

Callers 1

loadContestMethod · 0.45

Calls 2

ComparisonModeEnum · 0.85
setIndexMethod · 0.80

Tested by

no test coverage detected