libzypp  13.10.6
PoolStats.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13 //#include "zypp/base/Logger.h"
14 
15 #include "zypp/pool/PoolStats.h"
16 
17 using std::endl;
18 
20 namespace zypp
21 {
22  namespace pool
24  {
25 
26  /******************************************************************
27  **
28  ** FUNCTION NAME : operator<<
29  ** FUNCTION TYPE : std::ostream &
30  */
31  std::ostream & operator<<( std::ostream & str, const PoolStats & obj )
32  {
33  str << "ResObjects: " << obj._total;
34  for( PoolStats::KindMap::const_iterator it = obj._perKind.begin(); it != obj._perKind.end(); ++it )
35  {
36  str << endl << " " << it->first << ":\t" << it->second;
37  }
38  return str;
39  }
40 
42  } // namespace pool
45 } // namespace zypp
std::ostream & operator<<(std::ostream &str, const PoolStats &obj)
Definition: PoolStats.cc:31
Functor counting ResObjects per Kind.
Definition: PoolStats.h:44
Counter< unsigned > _total
Definition: PoolStats.h:53