22 #include "softwarecontainer-common.h" 23 #include "configloader.h" 24 #include "configtypes.h" 25 #include "configsource.h" 26 #include "configdefinition.h" 34 LOG_DECLARE_CLASS_CONTEXT(
"CFGM",
"Main config source");
47 std::vector<StringConfig> stringConfigs()
override;
48 std::vector<IntConfig> intConfigs()
override;
49 std::vector<BoolConfig> boolConfigs()
override;
60 void readLoadedConfig();
62 void createConfigItems();
68 ConfigType typeOf(
const std::string &group,
const std::string &key);
70 void create(
const std::string &group,
const std::string &key,
ConfigType type);
72 template<
typename T,
typename U>
73 T createConfig(
const std::string &group,
const std::string &name);
79 T getGlibValue(
const std::string &group,
const std::string &key)
const;
81 std::unique_ptr<ConfigLoader> m_loader;
82 TypeMap m_typeMapping;
83 std::unique_ptr<Glib::KeyFile> m_config;
84 std::map<std::string, std::vector<std::string>> m_configsByGroup;
85 std::vector<StringConfig> m_stringConfigs;
86 std::vector<IntConfig> m_intConfigs;
87 std::vector<BoolConfig> m_boolConfigs;
ConfigType
Represents the type of a config value.
Base class for all config sources.
MainConfigSource(std::unique_ptr< ConfigLoader > loader, TypeMap typeMapping)
Developers guide to adding a config item: