diff options
author | Andrew Bardsley <Andrew.Bardsley@arm.com> | 2014-09-20 17:17:47 -0400 |
---|---|---|
committer | Andrew Bardsley <Andrew.Bardsley@arm.com> | 2014-09-20 17:17:47 -0400 |
commit | b2c2e67468bba6dbbbfb6856ca94fdcfa1492258 (patch) | |
tree | 3f5d7326ec9c4b88e1a9b40331acf1b8b0ebc6be /src/base/inifile.cc | |
parent | e553ca67d419f62098acdba68c3b48eba769dcc5 (diff) | |
download | gem5-b2c2e67468bba6dbbbfb6856ca94fdcfa1492258.tar.xz |
base: Add getSectionNames to IniFile
Add an accessor to IniFile to list all the sections in the file.
Diffstat (limited to 'src/base/inifile.cc')
-rw-r--r-- | src/base/inifile.cc | 10 |
1 files changed, 10 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 §ionName) } +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() { |