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:
28
app/include/ConfigManager.h
Normal file
28
app/include/ConfigManager.h
Normal 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_
|
||||
Reference in New Issue
Block a user