koto/desktop/config/library.cpp

26 lines
615 B
C++
Raw Normal View History

2024-09-29 17:29:10 +03:00
#include "library.hpp"
#include <QDebug>
2024-09-29 17:29:10 +03:00
#include <string>
KotoLibraryConfig::KotoLibraryConfig(std::string name, fs::path path) {
this->i_name = name;
this->i_path = path;
qDebug() << "Library: " << this->i_name.c_str() << " at " << this->i_path.c_str();
}
KotoLibraryConfig::~KotoLibraryConfig() {}
KotoLibraryConfig::KotoLibraryConfig(const toml::value& v) {
this->i_name = toml::find<std::string>(v, "name");
this->i_path = toml::find<std::string>(v, "path");
2024-09-29 17:29:10 +03:00
}
std::string KotoLibraryConfig::getName() {
return this->i_name;
2024-09-29 17:29:10 +03:00
}
fs::path KotoLibraryConfig::getPath() {
return this->i_path;
2024-09-29 17:29:10 +03:00
}