Go to the documentation of this file. 1 #ifndef TASK_PARSER_HPP
2 #define TASK_PARSER_HPP
8 #include <QSharedPointer>
9 #include <nlohmann/json.hpp>
33 QVector<QSharedPointer<Task>>
loadTasks(
const QString& taskPath,
const QString& difficultyPath,
const QString& topicPath);
47 QVector<QSharedPointer<Task>> parseTasks(
const json& taskJsonData,
const json& difficultyJsonData,
const json& topicJsonData);
56 QVector<Subtask> parseSubtasks(
const json& subtasksJson, QSharedPointer<Task> parentTask);
59 #endif // TASK_PARSER_HPP
const QString USER_WORKSPACE
Path to the user workspace directory. Adjust it in devconatiner.json if changed.
Definition: folder_structure_constants.hpp:63
QString evaluationFilePath
The file path to the evaluation script of the subtask.
Definition: task.hpp:37
nlohmann::json json
Definition: notebook_converter.cpp:12
QString file
The file name of the subtask.
Definition: task.hpp:34
QVector< QSharedPointer< Task > > loadTasks(const QString &taskPath, const QString &difficultyPath, const QString &topicPath)
Loads tasks with all configuration JSON files.
Definition: task_parser.cpp:33
int timeoutSeconds
The timeout for the subtask execution in seconds.
Definition: task.hpp:40
QString solutionFilePath
The file path to the solution of the subtask.
Definition: task.hpp:36
QString description
The description of the subtask.
Definition: task.hpp:33
QString title
The title of the subtask.
Definition: task.hpp:32
QString getPackagePath()
Retrieves the path of the package.
Definition: folder_structure_constants.hpp:80
QWeakPointer< Task > parentTask
Weak pointer to the parent task.
Definition: task.hpp:45
const QString SOLUTION_SCRIPTS_SOURCE_PATH
Path to the solution scripts source directory.
Definition: folder_structure_constants.hpp:51
const QString EVALUATION_SCRIPTS_SOURCE_PATH
Path to the evaluation scripts source directory.
Definition: folder_structure_constants.hpp:57
QString filePath
The file path of the subtask.
Definition: task.hpp:35
Parses tasks and subtasks from a JSON file.
Definition: task_parser.hpp:18
nlohmann::json json
Definition: task_parser.cpp:9
bool reset_robot_before_executing
Whether to reset the robot before executing the subtask.
Definition: task.hpp:42
bool parallelizedEvaluationRequired
Whether parallelized evaluation is required.
Definition: task.hpp:41
Represents a task containing multiple subtasks.
Definition: task.hpp:61
Represents a subtask within a task.
Definition: task.hpp:31