summaryrefslogtreecommitdiff
path: root/louloulibs/config
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-12-22 21:37:29 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-12-23 11:05:55 +0100
commit9ac0d3a5766494c9c0c2074c4a21542eea195a29 (patch)
tree3cdc18699373eb5c6e2b68cb6686de997ff8bbe3 /louloulibs/config
parent9167cdf1269c1956b72db1e8dfdbfd61cbf66bb9 (diff)
downloadbiboumi-9ac0d3a5766494c9c0c2074c4a21542eea195a29.tar.gz
biboumi-9ac0d3a5766494c9c0c2074c4a21542eea195a29.tar.bz2
biboumi-9ac0d3a5766494c9c0c2074c4a21542eea195a29.tar.xz
biboumi-9ac0d3a5766494c9c0c2074c4a21542eea195a29.zip
A few cleanups, and make a few things more modern
Diffstat (limited to 'louloulibs/config')
-rw-r--r--louloulibs/config/config.hpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/louloulibs/config/config.hpp b/louloulibs/config/config.hpp
index e070816..688c081 100644
--- a/louloulibs/config/config.hpp
+++ b/louloulibs/config/config.hpp
@@ -7,7 +7,7 @@
* If you want to exit if the file does not exist when it is open for
* reading, set Config::file_must_exist = true.
*
- * Config::get() can the be used to access the values in the conf.
+ * Config::get() can then be used to access the values in the conf.
*
* Use Config::close() when you're done getting/setting value. This will
* save the config into the file.
@@ -33,35 +33,29 @@ public:
/**
* returns a value from the config. If it doesn’t exist, use
* the second argument as the default.
- * @param option The option we want
- * @param def The default value in case the option does not exist
*/
static std::string get(const std::string&, const std::string&);
/**
* returns a value from the config. If it doesn’t exist, use
* the second argument as the default.
- * @param option The option we want
- * @param def The default value in case the option does not exist
*/
static int get_int(const std::string&, const int&);
/**
* Set a value for the given option. And write all the config
- * in the file from which it was read if boolean is set.
- * @param option The option to set
- * @param value The value to use
- * @param save if true, save the config file
+ * in the file from which it was read if save is true.
*/
static void set(const std::string&, const std::string&, bool save = false);
/**
* Adds a function to a list. This function will be called whenever a
- * configuration change occurs.
+ * configuration change occurs (when set() is called, or when the initial
+ * conf is read)
*/
static void connect(t_config_changed_callback);
/**
- * Close the config file, saving it to the file is save == true.
+ * Destroy the instance, forcing it to be recreated (with potentially
+ * different parameters) the next time it’s needed.
*/
static void close();
-
/**
* Set the value of the filename to use, before calling any method.
*/