#pragma once #include #include namespace mrbesen { class Config { public: class Section { public: template T get(const std::string& valueName) const; private: std::map values; friend class Config; }; Config(const std::string& filename); virtual ~Config(); bool loadConfig(); const Section* getSection(std::string sectionName) const; template T get(const std::string& valueName) const; private: std::string filename; std::map sections; Section main; // config values without a section static const std::string SPLIT; }; }