libzypp: zypp/ng/log/sat/solvablespec.cc Source File

libzypp 17.38.13

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>
12#include <zypp/ng/sat/solvablespec.h>
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
37 std::ostream & formatter<sat::EvaluatedSolvableSpec>::stream( std::ostream & str, const sat::EvaluatedSolvableSpec & obj )
38 {
39 return str << "EvaluatedSolvableSpec{ids:" << obj.ids().size() << "}";
40 }
41
42 } // namespace log
43
44} // namespace zyppng
zyppng::sat::EvaluatedSolvableSpec
A SolvableSpec that has been evaluated against a specific Pool.
Definition solvablespec.h:175
zyppng::sat::EvaluatedSolvableSpec::ids
const SolvIdSet & ids() const
Direct access to the resolved id set (e.g.
Definition solvablespec.h:195
zyppng::sat::SolvableSpec
A pure data container describing a set of solvables by ident and/or provides.
Definition solvablespec.h:55
zyppng::sat::SolvableSpec::provides
const CapabilitySet & provides() const
Definition solvablespec.h:101
zyppng::sat::SolvableSpec::idents
const IdStringSet & idents() const
Definition solvablespec.h:82
solvablespec.h
str
String related utilities and Regular expression matching.
zyppng::log
Definition format.h:29
zyppng
Definition MediaNetworkRequestExecutor.h:16
solvablespec.h
This file contains private API, this might break at any time between releases.
zyppng::log::formatter
Primary trait for object formatting.
Definition format.h:67