added data() member in StatisticsBase class to directly get a senf::StatisticsData
pug [Fri, 15 Jul 2011 11:22:32 +0000 (11:22 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1798 270642c3-0616-0410-b53a-bc976706d245

senf/Utils/Statistics.cci
senf/Utils/Statistics.hh

index 3e76bba..8e7b093 100644 (file)
@@ -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
 
index 8217a22..cdea0da 100644 (file)
@@ -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