aboutsummaryrefslogtreecommitdiff
path: root/lib/configuration/init_global.cpp.in
diff options
context:
space:
mode:
Diffstat (limited to 'lib/configuration/init_global.cpp.in')
-rw-r--r--lib/configuration/init_global.cpp.in25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/configuration/init_global.cpp.in b/lib/configuration/init_global.cpp.in
new file mode 100644
index 0000000..9179130
--- /dev/null
+++ b/lib/configuration/init_global.cpp.in
@@ -0,0 +1,25 @@
+/*
+ * This is a generated file.
+ *
+ * This file is part of smolbote. It's copyrighted by the contributors recorded
+ * in the version control history of the file, available from its original
+ * location: https://neueland.iserlohn-fortress.net/cgit/smolbote.git
+ *
+ * SPDX-License-Identifier: GPL-3.0
+ */
+
+#include "configuration.h"
+
+std::string Configuration::init_global(const std::string &p_path)
+{
+ auto value_map = std::make_unique<Configuration, std::initializer_list<std::pair<std::string, conf_value_t>>>({
+ /* @__DEFAULT_CFG__ */
+ });
+
+ // load the actual configuration file
+ const auto cfgpath = p_path.empty() ? value_map->value<std::string>("poi/config").value() : p_path;
+ value_map->read_file(cfgpath);
+
+ move_global(std::move(value_map));
+ return cfgpath;
+}