libzypp  17.38.7
solvablespec.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 ----------------------------------------------------------------------*/
9 #include "solvablespec.h"
10 
11 #include <iostream>
13 
14 namespace zyppng {
15 
16  namespace log {
17 
18  std::ostream & formatter<sat::SolvableSpec>::stream( std::ostream & str, const sat::SolvableSpec & obj )
19  {
20  str << "SolvableSpec{idents:[";
21  bool first = true;
22  for ( const auto & id : obj.idents() ) {
23  if ( !first ) str << ',';
24  str << id.c_str();
25  first = false;
26  }
27  str << "] provides:[";
28  first = true;
29  for ( const auto & cap : obj.provides() ) {
30  if ( !first ) str << ',';
31  str << "provides:" << cap.c_str();
32  first = false;
33  }
34  return str << "]}";
35  }
36 
38  {
39  return str << "EvaluatedSolvableSpec{ids:" << obj.ids().size() << "}";
40  }
41 
42  } // namespace log
43 
44 } // namespace zyppng
const CapabilitySet & provides() const
Definition: solvablespec.h:101
String related utilities and Regular expression matching.
A SolvableSpec that has been evaluated against a specific Pool.
Definition: solvablespec.h:174
A pure data container describing a set of solvables by ident and/or provides.
Definition: solvablespec.h:54
This file contains private API, this might break at any time between releases.
const SolvIdSet & ids() const
Direct access to the resolved id set (e.g.
Definition: solvablespec.h:195
const IdStringSet & idents() const
Definition: solvablespec.h:82
Primary trait for object formatting.
Definition: format.h:67