removed needless Boost.Iostreams dependency
[senf.git] / senf / Utils / Statistics.cci
index 2e72991..b008d98 100644 (file)
@@ -27,6 +27,7 @@
 
 // Custom includes
 #include <float.h>
+#include <senf/Utils/Console/ParsedCommand.hh>
 #include "Range.hh"
 
 #define prefix_ inline
@@ -65,9 +66,7 @@ prefix_ senf::StatisticsBase::OutputEntry::OutputEntry(const OutputEntry& other)
 
 prefix_ void senf::StatisticsBase::OutputEntry::initDir()
 {
-    namespace fty = senf::console::factory;
-
-    dir.add("list", fty::Command(&OutputEntry::consoleList, this)
+    dir.add("list", console::factory::Command(&OutputEntry::consoleList, this)
             .doc("List all known connected targets. This list might not be complete.") );
 }
 
@@ -82,14 +81,6 @@ senf::StatisticsBase::OutputEntry::operator=(const OutputEntry& other)
     return *this;
 }
 
-prefix_ void senf::StatisticsBase::OutputEntry::consoleList(std::ostream & os)
-{
-    for (boost::ptr_vector<TargetBase>::iterator i (targets_.begin());
-         i != targets_.end(); ++i)
-        if (! i->label.empty())
-            os << i->label << "\n";
-}
-
 //-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::StatisticsBase
 
@@ -181,11 +172,17 @@ prefix_ void senf::Statistics::operator()(float min, float avg, float max, float
     enter(1, min, avg, max, dev);
 }
 
+prefix_ void senf::Statistics::operator()(StatisticsData const & data)
+{
+  enter(1, data.min, data.avg, data.max, data.stddev);
+}
+
 prefix_ void senf::Statistics::operator()(float value, float dev)
 {
     enter(1, value, value, value, dev);
 }
 
+
 prefix_ senf::StatisticsBase::OutputProxy<senf::Statistics>
 senf::Statistics::output(unsigned n)
 {