libzypp 17.37.10

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{
23 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
PoolStats.h
str
String related utilities and Regular expression matching.
zypp::pool
Definition ByIdent.h:24
zypp::pool::operator<<
std::ostream & operator<<(std::ostream &str, const PoolStats &obj)
Definition PoolStats.cc:31
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
zypp::pool::PoolStats
Functor counting ResObjects per Kind.
Definition PoolStats.h:45
zypp::pool::PoolStats::_perKind
KindMap _perKind
Definition PoolStats.h:54
zypp::pool::PoolStats::_total
Counter< unsigned > _total
Definition PoolStats.h:53