logic: Configmanager support for lists

Configmanager now works with list. Use getValues for list. Configmanager
is able to save into a file now.
This commit is contained in:
Andreas Stallinger
2014-10-30 14:22:28 +01:00
parent 2c84bf20ed
commit 250918a4e7
11 changed files with 252 additions and 33 deletions
+1 -14
View File
@@ -33,7 +33,7 @@ void Settings::save(const std::string& filePath)
{
if (m_config)
{
m_config->save();
m_config->save(filePath);
}
else
{
@@ -45,16 +45,3 @@ void Settings::clear()
{
m_config = ConfigManager::createEmpty();
}
std::vector<std::string> Settings::getValues(const std::string& key, std::string defaultValue) const
{
std::string value = getValue<std::string>(key, defaultValue);
if (value.size())
{
std::deque<std::string> values = utility::split(value, '|');
return std::vector<std::string>(values.begin(), values.end());
}
return std::vector<std::string>();
}