
#include "system.hpp"
#include "imports/import_mentor.hpp"

System::System(): mods(nullptr), conns(nullptr) {
    mods = new Modules();
    conns = new Connections();
}

System::~System() {
    delete mods;
    delete conns;
}

void System::Load(std::string module_name, std::string file_name, ImportType type) {
    ImportBase *imp;
    Parts *prts = nullptr;
    Module mod = Module(module_name);
    switch (type)
    {
    case ImportType::IMPORT_MENTOR :
        imp = new ImportMentor(file_name);
        imp->parse();
        prts = imp->parts();
        mod.add(prts);
        break;

    default:
        break;
    }
}