- bool printed = false;
-
- if (!entry.group || entry.value != "") {
- printValue(os, name, entry.value, tab_depth);
- printed = true;
- }
-
- if (entry.group) {
- printGroup(os, name, entry.group, tab_depth);
- printed = true;
- }
-
- return printed;
-}
-
-
-
-void Settings::printValue(std::ostream &os, const std::string &name,
- const std::string &value, u32 tab_depth)
-{
- for (u32 i = 0; i != tab_depth; i++)
- os << "\t";
- os << name << " = ";
-
- if (value.find('\n') != std::string::npos)
- os << "\"\"\"\n" << value << "\n\"\"\"\n";
- else
- os << value << "\n";
-}
-
-
-void Settings::printGroup(std::ostream &os, const std::string &name,
- const Settings *group, u32 tab_depth)
-{
- // Recursively write group contents
- for (u32 i = 0; i != tab_depth; i++)
- os << "\t";
-
- os << name << " = {\n";
- group->writeLines(os, tab_depth + 1);
-