Packets: extended description of bad_cast exception in Packet.as()
[senf.git] / senf / Utils / Statistics.cci
index d522f9f..98c7c0c 100644 (file)
@@ -65,8 +65,7 @@ prefix_ senf::StatisticsBase::OutputEntry::OutputEntry(const OutputEntry& other)
 
 prefix_ void senf::StatisticsBase::OutputEntry::initDir()
 {
-    namespace fty = senf::console::factory;
-
+    namespace fty = console::factory;
     dir.add("list", fty::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,6 +172,11 @@ 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);