libzypp 17.38.6
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
14namespace 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
A SolvableSpec that has been evaluated against a specific Pool.
const SolvIdSet & ids() const
Direct access to the resolved id set (e.g.
A pure data container describing a set of solvables by ident and/or provides.
const CapabilitySet & provides() const
const IdStringSet & idents() const
String related utilities and Regular expression matching.
This file contains private API, this might break at any time between releases.
Primary trait for object formatting.
Definition format.h:67