summaryrefslogtreecommitdiff
path: root/src/base/statistics.hh
diff options
context:
space:
mode:
authorBrad Danofsky <bradley.danofsky@amd.com>2011-04-20 11:14:52 -0700
committerBrad Danofsky <bradley.danofsky@amd.com>2011-04-20 11:14:52 -0700
commit46a538ceab12c89f1806293f6e5f4e89f6605da4 (patch)
tree5785b1f6dbac1aa3a06ff5569e8bc17cc9463d52 /src/base/statistics.hh
parentdd38b4b83e6c8bf7a9031dfeead13a5ef354f46c (diff)
downloadgem5-46a538ceab12c89f1806293f6e5f4e89f6605da4.tar.xz
stats: add user settable separator string for arrayed stats
Default is '::', so no visible change unless it is overridden
Diffstat (limited to 'src/base/statistics.hh')
-rw-r--r--src/base/statistics.hh17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index de5540272..f139bce61 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -256,6 +256,23 @@ class DataWrap : public InfoAccess
const std::string &name() const { return this->info()->name; }
/**
+ * Set the character(s) used between the name and vector number
+ * on vectors, dist, etc.
+ * @param _sep The new separator string
+ * @return A reference to this stat.
+ */
+ Derived &
+ setSeparator(const std::string &_sep)
+ {
+ this->info()->setSeparator(_sep);
+ return this->self();
+ }
+ const std::string &setSeparator() const
+ {
+ return this->info()->separatorString;
+ }
+
+ /**
* Set the description and marks this stat to print at the end of
* simulation.
* @param desc The new description.