checks-parser/ofd/module.cpp

25 lines
513 B
C++
Raw Permalink Normal View History

#include "module.h"
#include <nlohmann/json.hpp>
#include <fstream>
#include "../utils/utils.h"
OFDModule::OFDModule() {}
OFDModule::OFDModule(std::string path) {
this->path = path;
std::ifstream settings_file(path);
nlohmann::json settings = nlohmann::json::parse(settings_file);
this->name = from_utf8(settings["name"]);
this->url = from_utf8(settings["url"]);
}
std::wstring OFDModule::get_name() {
return this->name;
}
std::wstring OFDModule::get_url() {
return this->url;
}