Digitalisierte Elektroverteilung zur permanenten Verbraucherüberwachung
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SystemConfig.h 823B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include <iostream>
  3. #include <fstream>
  4. #include <string>
  5. #include <array>
  6. #include <map>
  7. #include <easylogging++.h>
  8. #include <memory>
  9. class SystemConfig
  10. {
  11. public:
  12. void readStandardConfig();
  13. SystemConfig();
  14. static int getIntConfigParameter(std::string paramName);
  15. static float getFloatConfigParameter(std::string paramName);
  16. static std::string getStringConfigParameter(std::string paramName);
  17. private:
  18. //Parameters to read from the file (name and default value)
  19. static std::map<std::string, int> intParameter;
  20. static std::map<std::string, float> floatParameter;
  21. static std::map<std::string, std::string> stringParameter;
  22. const std::string filePath = "system_conf.conf";
  23. std::string fileContent;
  24. void parseConfFile();
  25. friend std::ostream& operator<<(std::ostream& os, SystemConfig& config);
  26. };