Refactoring, housekeeping, documentation

Add a class diagram. Still needs some details.
Refactor to better respect SOLID principles.
Housekeeping, move and rename classes/files.
This commit is contained in:
2022-09-27 00:09:30 +02:00
parent 4f6a1dfc4f
commit 289c55b78c
28 changed files with 402 additions and 339 deletions

View File

@@ -0,0 +1,28 @@
#ifndef CONFIGMANAGER_H_
#define CONFIGMANAGER_H_
#include <memory>
#include <vector>
#include <nlohmann/json.hpp>
#include <fan/Fan.h>
#define CONFIG_FILE "/etc/fantasize/config.json"
using json = nlohmann::json;
class ConfigManager {
public:
ConfigManager();
~ConfigManager();
void WriteConfig();
void SaveFans(std::vector<std::shared_ptr<Fan>> fans);
private:
json mConfig;
};
#endif // CONFIGMANAGER_H_