package _VisualDVM.TestingSystem.DVM.DVMTasks;
import Common.Utils.Index;
import _VisualDVM.TestingSystem.Common.Group.Group;
import _VisualDVM.TestingSystem.Common.Test.Test;
import _VisualDVM.TestingSystem.DVM.DVMConfiguration.DVMConfiguration;
import com.google.gson.annotations.Expose;

import java.util.List;
import java.util.Vector;
public class DVMCompilationTask extends DVMTask {
    @Expose
    public List<DVMRunTask> runTasks = new Vector<>();
    //-
    public DVMCompilationTask() {
    }
    //--
    public DVMCompilationTask(Index index, DVMConfiguration configuration, String flags_in, Group group, Test test) {
        super(index, configuration, group, test, flags_in);
        maxtime = configuration.c_maxtime;
    }
    //--
    @Override
    public Vector<String> pack(Object arg) {
        Vector<String> res = new Vector<>();
        res.add(String.valueOf(id)); //1
        res.add(String.valueOf(maxtime)); //2
        res.add(String.valueOf(test_id)); //3
        res.add(arg.toString().replace("\n", "|")); //4
        return res;
    }
}
