X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FStatistics.hh;h=4d64692f2526688f0cde97d1f0bf7b941fdf9a91;hb=refs%2Fheads%2Fmaster;hp=0e7936100428355787d29b06aabc50d205e57384;hpb=ecbf10f737b7f1305670600ac0f1134625f14f05;p=senf.git diff --git a/senf/Utils/Statistics.hh b/senf/Utils/Statistics.hh index 0e79361..4d64692 100644 --- a/senf/Utils/Statistics.hh +++ b/senf/Utils/Statistics.hh @@ -74,10 +74,14 @@ namespace senf { { typedef std::map Children; - typedef boost::transform_iterator< ::__gnu_cxx::select2nd, - Children::iterator > collector_iterator; - typedef boost::transform_iterator< ::__gnu_cxx::select2nd, - Children::const_iterator > collector_const_iterator; + // why we can't use ::__gnu_cxx::select2nd instead?!?! + struct Transform { + typedef Children::value_type & first_argument_type; + typedef Collector & result_type; + result_type operator()(first_argument_type i) const; + }; + + typedef boost::transform_iterator ValueIterator; struct OutputEntry; @@ -85,8 +89,7 @@ namespace senf { //-//////////////////////////////////////////////////////////////////////// // Types - typedef boost::iterator_range CollectorRange; - typedef boost::iterator_range const_CollectorRange; + typedef boost::iterator_range CollectorRange; /** \brief Output connection interface @@ -188,10 +191,6 @@ namespace senf { CollectorRange collectors(); ///< List all child collectors /**< \returns iterator range of child collector references */ - const_CollectorRange collectors() const; - ///< List all child collectors - /**< \returns const iterator range of child collector - references */ Collector & collect(unsigned rank); ///< Register a new collector /**< Adds a collector collecting \a rank values into each @@ -201,11 +200,6 @@ namespace senf { \throws DuplicateRankException if a collector collecting \a rank values already exists. */ - Statistics const & base() const; ///< Get const base statistics object - /**< Returns the base statistics object as const reference. - If this is a child collector, this will return the outermost - statistics object, otherwise it will return - \c *this. */ Statistics & base(); ///< Get base statistics object /**< Returns the base statistics object. If this is a child collector, this will return the outermost @@ -497,7 +491,7 @@ namespace senf { StatisticsBase::OutputProxy output(unsigned n = 1u); - void consoleList(std::ostream & os); + void consoleList(std::ostream & os) const; void consoleCollect(std::vector & ranks); boost::shared_ptr consoleOutput( std::vector & ranks, unsigned window);