From: pug Date: Fri, 15 Jul 2011 11:22:32 +0000 (+0000) Subject: added data() member in StatisticsBase class to directly get a senf::StatisticsData X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=0aaf358bb221fa902aa291b66436206e7cb4de0c;p=senf.git added data() member in StatisticsBase class to directly get a senf::StatisticsData git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1798 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Utils/Statistics.cci b/senf/Utils/Statistics.cci index 3e76bba..8e7b093 100644 --- a/senf/Utils/Statistics.cci +++ b/senf/Utils/Statistics.cci @@ -142,6 +142,11 @@ prefix_ std::string senf::StatisticsBase::path() return v_path(); } +prefix_ senf::StatisticsData senf::StatisticsBase::data() +{ + return StatisticsData(min_, avg_, max_, dev_, 0); +} + //-///////////////////////////////////////////////////////////////////////////////////////////////// // senf::Collector diff --git a/senf/Utils/Statistics.hh b/senf/Utils/Statistics.hh index 8217a22..cdea0da 100644 --- a/senf/Utils/Statistics.hh +++ b/senf/Utils/Statistics.hh @@ -229,6 +229,12 @@ namespace senf { \param[in] n size of sliding average window */ //\} + StatisticsData data(); ///< Get the Statistics data as senf::StatisticsData + /**< Return a Statistic Data object containing values + from this instance. + */ + + //-//////////////////////////////////////////////////////////////////////// // Exceptions