summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2003-11-03 20:35:05 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2003-11-03 20:35:05 -0800
commite4b52476bc00fe8c0115ee5ec6e9551447cb04a3 (patch)
tree0671e5be86419c60743915af2f3503fa6de28ac4 /base
parent02795babaf52cbf6f8c29bbb2aecfc0e60b46b63 (diff)
parent29474bdf027fe3396e0be2f6acbe2a6b89136bc2 (diff)
downloadgem5-e4b52476bc00fe8c0115ee5ec6e9551447cb04a3.tar.xz
Automerge
--HG-- extra : convert_revision : 2ca18ecbf04a1de72391073d0a5309fdbbdfefda
Diffstat (limited to 'base')
-rw-r--r--base/inifile.cc8
-rw-r--r--base/inifile.hh7
-rw-r--r--base/statistics.cc2
-rw-r--r--base/statistics.hh3
4 files changed, 18 insertions, 2 deletions
diff --git a/base/inifile.cc b/base/inifile.cc
index 7e7485bcb..2717a534d 100644
--- a/base/inifile.cc
+++ b/base/inifile.cc
@@ -402,6 +402,14 @@ IniFile::findAppend(const string &_section, const string &entry,
return ret;
}
+
+bool
+IniFile::sectionExists(const string &sectionName) const
+{
+ return findSection(sectionName) != NULL;
+}
+
+
bool
IniFile::Section::printUnreferenced(const string &sectionName)
{
diff --git a/base/inifile.hh b/base/inifile.hh
index f67fdc7be..f7229f2f2 100644
--- a/base/inifile.hh
+++ b/base/inifile.hh
@@ -208,6 +208,13 @@ class IniFile
bool findAppend(const std::string &section, const std::string &entry,
std::string &value) const;
+ /// Determine whether the named section exists in the .ini file.
+ /// Note that the 'Section' class is (intentionally) not public,
+ /// so all clients can do is get a bool that says whether there
+ /// are any values in that section or not.
+ /// @return True if the section exists.
+ bool sectionExists(const std::string &section) const;
+
/// Print unreferenced entries in object. Iteratively calls
/// printUnreferend() on all the constituent sections.
bool printUnreferenced();
diff --git a/base/statistics.cc b/base/statistics.cc
index 8b2d8e5de..c1a5b2626 100644
--- a/base/statistics.cc
+++ b/base/statistics.cc
@@ -919,7 +919,7 @@ dump(ostream &stream)
CallbackQueue resetQueue;
void
-regReset(Callback *cb)
+RegResetCallback(Callback *cb)
{
resetQueue.add(cb);
}
diff --git a/base/statistics.hh b/base/statistics.hh
index 056adea57..2fe6988b0 100644
--- a/base/statistics.hh
+++ b/base/statistics.hh
@@ -2277,6 +2277,7 @@ struct StatBin : public GenBin
int _size;
public:
+ enum { binned = true };
VectorBin() : _size(0) {}
bool initialized() const { return _size > 0; }
@@ -2762,7 +2763,7 @@ class Formula : public Detail::VectorStat
void check();
void dump(std::ostream &stream);
void reset();
-void regReset(Callback *cb);
+void RegResetCallback(Callback *cb);
inline Detail::Temp
operator+(Detail::Temp l, Detail::Temp r)