summaryrefslogtreecommitdiff
path: root/src/configuration.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-18 22:35:05 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-18 22:35:05 +0300
commitc964ce66f2eb972db4d626cdd33a93d5af2dd8d9 (patch)
treef1a3eaf19853b1035a808ec2e7b241d91ab2ab79 /src/configuration.h
parent18f877c15f9e31a9675fff4afe2c0b224bcdefd9 (diff)
downloadplus-c964ce66f2eb972db4d626cdd33a93d5af2dd8d9.tar.gz
plus-c964ce66f2eb972db4d626cdd33a93d5af2dd8d9.tar.bz2
plus-c964ce66f2eb972db4d626cdd33a93d5af2dd8d9.tar.xz
plus-c964ce66f2eb972db4d626cdd33a93d5af2dd8d9.zip
Fix code style in configuration.
Diffstat (limited to 'src/configuration.h')
-rw-r--r--src/configuration.h36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/configuration.h b/src/configuration.h
index 53b836795..d2e88d86b 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -185,7 +185,8 @@ class ConfigurationObject notfinal
return container;
for (ConfigurationList::const_iterator it = list->begin();
- it != list->end(); ++ it)
+ it != list->end();
+ ++ it)
{
container = manager->readConfigItem(*it, container);
}
@@ -291,33 +292,43 @@ class Configuration final : public ConfigurationObject
void incValue(const std::string &key);
- void setSilent(const std::string &key, const std::string &value);
+ void setSilent(const std::string &key,
+ const std::string &value);
- inline void setValue(const std::string &key, const char *const value)
+ inline void setValue(const std::string &key,
+ const char *const value)
{ if (value) setValue(key, std::string(value)); }
- inline void setSilent(const std::string &key, const char *const value)
+ inline void setSilent(const std::string &key,
+ const char *const value)
{ if (value) setSilent(key, std::string(value)); }
- inline void setValue(const std::string &key, const float value)
+ inline void setValue(const std::string &key,
+ const float value)
{ setValue(key, toString(value)); }
- inline void setValue(const std::string &key, const double value)
+ inline void setValue(const std::string &key,
+ const double value)
{ setValue(key, toString(value)); }
- inline void setValue(const std::string &key, const int value)
+ inline void setValue(const std::string &key,
+ const int value)
{ setValue(key, toString(value)); }
- inline void setValueInt(const std::string &key, const int value)
+ inline void setValueInt(const std::string &key,
+ const int value)
{ setValue(key, toString(value)); }
- inline void setValue(const std::string &key, const unsigned value)
+ inline void setValue(const std::string &key,
+ const unsigned value)
{ setValue(key, toString(value)); }
- inline void setValue(const std::string &key, const bool value)
+ inline void setValue(const std::string &key,
+ const bool value)
{ setValue(key, value ? "1" : "0"); }
- inline void setSilent(const std::string &key, const bool value)
+ inline void setSilent(const std::string &key,
+ const bool value)
{ setSilent(key, value ? "1" : "0"); }
int resetIntValue(const std::string &key);
@@ -333,8 +344,11 @@ class Configuration final : public ConfigurationObject
* @see defaults.h
*/
int getIntValue(const std::string &key) const A_WARN_UNUSED;
+
float getFloatValue(const std::string &key) const A_WARN_UNUSED;
+
std::string getStringValue(const std::string &key) const A_WARN_UNUSED;
+
bool getBoolValue(const std::string &key) const A_WARN_UNUSED;
std::string getDirectory() const A_WARN_UNUSED