{
typedef std::map<unsigned, Collector> Children;
- typedef boost::transform_iterator< ::__gnu_cxx::select2nd<Children::value_type>,
- Children::iterator > collector_iterator;
- typedef boost::transform_iterator< ::__gnu_cxx::select2nd<Children::value_type>,
- 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<Transform,Children::iterator> ValueIterator;
struct OutputEntry;
//-////////////////////////////////////////////////////////////////////////
// Types
- typedef boost::iterator_range<collector_iterator> CollectorRange;
- typedef boost::iterator_range<collector_const_iterator> const_CollectorRange;
+ typedef boost::iterator_range<ValueIterator> CollectorRange;
/** \brief Output connection interface
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
\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
StatisticsBase::OutputProxy<Statistics> output(unsigned n = 1u);
- void consoleList(std::ostream & os);
+ void consoleList(std::ostream & os) const;
void consoleCollect(std::vector<unsigned> & ranks);
boost::shared_ptr<senf::console::DirectoryNode> consoleOutput(
std::vector<unsigned> & ranks, unsigned window);