From f600ac613e699927a0e9894b703f8839d61c60ef Mon Sep 17 00:00:00 2001 From: Lisa Hsu Date: Tue, 21 Oct 2003 15:45:48 -0400 Subject: statistics.hh: change VectorDistProxy name to DistProxy - to be more consistent with other proxy namings. base/statistics.hh: change VectorDistProxy name to DistProxy - to be more consistent with other proxy namings. --HG-- extra : convert_revision : c470c93cf598506be56312db52f6c528c213a149 --- base/statistics.hh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'base') diff --git a/base/statistics.hh b/base/statistics.hh index bd70cf8a0..2ce37195f 100644 --- a/base/statistics.hh +++ b/base/statistics.hh @@ -1436,7 +1436,7 @@ class DistBase : public Stat }; template class Storage, class Bin> -class VectorDistProxy; +class DistProxy; template class Storage, class Bin> class VectorDistBase : public Stat @@ -1465,9 +1465,9 @@ class VectorDistBase : public Stat VectorDistBase() : Stat(true) { } ~VectorDistBase() { } - friend class VectorDistProxy; - VectorDistProxy operator[](int index); - const VectorDistProxy operator[](int index) const; + friend class DistProxy; + DistProxy operator[](int index); + const DistProxy operator[](int index) const; virtual size_t size() const { return bin.size(); } virtual bool zero() const { return false; } @@ -1475,7 +1475,7 @@ class VectorDistBase : public Stat }; template class Storage, class Bin> -class VectorDistProxy : public Stat +class DistProxy : public Stat { protected: typedef Storage storage_t; @@ -1495,11 +1495,11 @@ class VectorDistProxy : public Stat const storage_t *data() const { return cstat->data(index); } public: - VectorDistProxy(const VectorDistBase &s, int i) + DistProxy(const VectorDistBase &s, int i) : Stat(false), cstat(&s), index(i) {} - VectorDistProxy(const VectorDistProxy &sp) + DistProxy(const DistProxy &sp) : Stat(false), cstat(sp.cstat), index(sp.index) {} - const VectorDistProxy &operator=(const VectorDistProxy &sp) { + const DistProxy &operator=(const DistProxy &sp) { cstat = sp.cstat; index = sp.index; return *this; } @@ -1531,19 +1531,19 @@ class VectorDistProxy : public Stat }; template class Storage, class Bin> -inline VectorDistProxy +inline DistProxy VectorDistBase::operator[](int index) { assert (index >= 0 && index < size()); - return VectorDistProxy(*this, index); + return DistProxy(*this, index); } template class Storage, class Bin> -inline const VectorDistProxy +inline const DistProxy VectorDistBase::operator[](int index) const { assert (index >= 0 && index < size()); - return VectorDistProxy(*this, index); + return DistProxy(*this, index); } /** @@ -1554,7 +1554,7 @@ void VectorDistBase::display(std::ostream &stream) const { for (int i = 0; i < size(); ++i) { - VectorDistProxy proxy(*this, i); + DistProxy proxy(*this, i); proxy.display(stream); } } -- cgit v1.2.3