summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-04 03:20:07 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-04 03:20:07 -0500
commitf0cd59034ccc57d69fd79014ed3466deeea2c332 (patch)
tree5cb495d13508a1b93add8414796f229f8b3652ec /src/settings.h
parent0a5373d4002d462208d810dd8c3b5f5f8b3cf429 (diff)
downloadminetest-f0cd59034ccc57d69fd79014ed3466deeea2c332.tar.gz
minetest-f0cd59034ccc57d69fd79014ed3466deeea2c332.tar.bz2
minetest-f0cd59034ccc57d69fd79014ed3466deeea2c332.zip
Settings: Various setting group fixes and enhancements
- Remove blank setting values when setting has a group - Pair setting values with groups in file when possible - Preserve user-set whitespace in setting objects - Delete setting value when setting NoiseParams group - Delete overwritten groups outside of lock
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/settings.h b/src/settings.h
index cc7ea365d..6c063e43e 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -114,13 +114,20 @@ public:
SettingsParseEvent parseConfigObject(const std::string &line,
const std::string &end, std::string &name, std::string &value);
+ void getNamesPresent(std::istream &is, const std::string &end,
+ std::set<std::string> &present_values,
+ std::set<std::string> &present_groups);
bool updateConfigObject(std::istream &is, std::ostream &os,
const std::string &end, u32 tab_depth=0);
- static std::string getMultiline(std::istream &is);
+ static std::string getMultiline(std::istream &is, size_t *num_lines=NULL);
static std::string sanitizeString(const std::string &value);
+ static bool printEntry(std::ostream &os, const std::string &name,
+ const SettingsEntry &entry, u32 tab_depth=0);
static void printValue(std::ostream &os, const std::string &name,
- const SettingsEntry &entry, bool is_value_multiline, u32 tab_depth=0);
+ const std::string &value, u32 tab_depth=0);
+ static void printGroup(std::ostream &os, const std::string &name,
+ const Settings *group, u32 tab_depth=0);
/***********
* Getters *