summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/base/inifile.cc10
-rw-r--r--src/base/inifile.hh3
2 files changed, 13 insertions, 0 deletions
diff --git a/src/base/inifile.cc b/src/base/inifile.cc
index 011887635..402c6469f 100644
--- a/src/base/inifile.cc
+++ b/src/base/inifile.cc
@@ -280,6 +280,16 @@ IniFile::Section::printUnreferenced(const string &sectionName)
}
+void
+IniFile::getSectionNames(vector<string> &list) const
+{
+ for (SectionTable::const_iterator i = table.begin();
+ i != table.end(); ++i)
+ {
+ list.push_back((*i).first);
+ }
+}
+
bool
IniFile::printUnreferenced()
{
diff --git a/src/base/inifile.hh b/src/base/inifile.hh
index 83cf80cf0..c2d263619 100644
--- a/src/base/inifile.hh
+++ b/src/base/inifile.hh
@@ -192,6 +192,9 @@ class IniFile
/// @return True if the section exists.
bool sectionExists(const std::string &section) const;
+ /// Push all section names into the given vector
+ void getSectionNames(std::vector<std::string> &list) const;
+
/// Print unreferenced entries in object. Iteratively calls
/// printUnreferend() on all the constituent sections.
bool printUnreferenced();