libzypp  17.38.7
queue.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 ----------------------------------------------------------------------*/
9 #include "queue.h"
10 
11 #include <iostream>
13 #include <zypp/ng/sat/queue.h>
14 #include <zypp/ng/sat/solvable.h>
15 
17 
18 using std::endl;
19 
20 namespace zyppng {
21 
22  namespace log {
23  std::ostream &formatter<sat::Queue>::stream(std::ostream &str, const sat::Queue &obj)
24  {
25  return zypp::dumpRangeLine( str << "Queue ", obj.begin(), obj.end() );
26  }
27  }
28 
29  namespace sat {
30 
31  std::ostream & dumpOn( std::ostream & str, const Queue & obj )
32  {
33  str << "Queue {";
34  if ( ! obj.empty() )
35  {
36  str << endl;
37  for ( auto it = obj.begin(); it != obj.end(); ++it )
38  str << " " << Solvable(*it) << endl;
39  }
40  return str << "}";
41  }
42 
43  } // namespace sat
44 } // namespace zyppng
A Solvable object within the sat Pool.
Definition: solvable.h:64
bool empty() const
Definition: queue.cc:52
String related utilities and Regular expression matching.
std::ostream & dumpOn(std::ostream &str, const Queue &obj)
relates: Queue Stream output assuming a Solvable queue.
Definition: queue.cc:31
const_iterator begin() const
Definition: queue.cc:58
Libsolv Id queue wrapper.
Definition: queue.h:36
const_iterator end() const
Definition: queue.cc:61
std::ostream & dumpRangeLine(std::ostream &str, TIterator begin, TIterator end)
Print range defined by iterators (single line style).
Definition: LogTools.h:432
Primary trait for object formatting.
Definition: format.h:67