2021-01-01 22:23:27 +00:00
|
|
|
#ifndef CONFIGURATION_H_
|
|
|
|
#define CONFIGURATION_H_
|
|
|
|
|
|
|
|
#include <list>
|
2021-01-03 21:43:35 +00:00
|
|
|
#include <memory>
|
2021-01-01 22:23:27 +00:00
|
|
|
|
|
|
|
#include <Arduino.h>
|
2021-01-09 12:36:49 +00:00
|
|
|
#ifndef CPPCHECK
|
2021-01-01 22:23:27 +00:00
|
|
|
#include <ArduinoJson.h>
|
2021-01-09 12:36:49 +00:00
|
|
|
#endif
|
2021-01-01 22:23:27 +00:00
|
|
|
|
|
|
|
class Configuration;
|
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
class ConfigurationManagement {
|
2021-01-01 22:23:27 +00:00
|
|
|
public:
|
2021-03-12 22:21:45 +00:00
|
|
|
explicit ConfigurationManagement(String FilePath);
|
|
|
|
virtual ~ConfigurationManagement();
|
2021-01-01 22:23:27 +00:00
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
std::shared_ptr<Configuration> readConfiguration();
|
|
|
|
void writeConfiguration(std::shared_ptr<Configuration> conf);
|
2021-01-01 22:23:27 +00:00
|
|
|
|
|
|
|
private:
|
2021-03-12 22:21:45 +00:00
|
|
|
virtual std::shared_ptr<Configuration> readProjectConfiguration(DynamicJsonDocument &data) = 0;
|
|
|
|
virtual void writeProjectConfiguration(std::shared_ptr<Configuration> conf, DynamicJsonDocument &data) = 0;
|
2021-01-01 22:23:27 +00:00
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
const String mFilePath;
|
2021-01-01 22:23:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|