libzypp 17.31.23
SolvIterMixin.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
16#include <zypp/sat/Solvable.h>
17#include <zypp/ResPoolProxy.h>
19
20using std::endl;
21
23namespace zypp
24{
26 namespace sat
27 {
28
29 namespace solvitermixin_detail
30 {
31 bool UnifyByIdent::operator()( const Solvable & solv_r ) const
32 {
33 // Need to use pool::ByIdent because packages and srcpackages have the same id.
34 return( solv_r && _uset->insert( pool::ByIdent( solv_r ).get() ).second );
35 }
36 }
37
39 // asSolvable
42 {
43 return pi_r.satSolvable();
44 }
45
46 Solvable asSolvable::operator()( const ResObject_constPtr & res_r ) const
47 {
48 return res_r ? res_r->satSolvable() : Solvable();
49 }
50
52 } // namespace sat
54
56 namespace ui
57 {
58
59 Selectable_Ptr asSelectable::operator()( const sat::Solvable & sov_r ) const
60 {
61 return ResPool::instance().proxy().lookup( sov_r );
62 }
63
65 } // namespace ui
68} // namespace zypp
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:51
ui::Selectable::Ptr lookup(const pool::ByIdent &ident_r) const
static ResPool instance()
Singleton ctor.
Definition: ResPool.cc:37
ResPoolProxy proxy() const
preliminary
Definition: ResPool.cc:58
Main filter selecting PoolItems by name and kind.
Definition: ByIdent.h:27
sat::detail::IdType get() const
Definition: ByIdent.h:88
A Solvable object within the sat Pool.
Definition: Solvable.h:54
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
Solvable satSolvable() const
Return the corresponding sat::Solvable.
Definition: SolvableType.h:57
Solvable operator()(const Solvable &solv_r) const
Definition: Solvable.h:565
bool operator()(const Solvable &solv_r) const
Selectable_Ptr operator()(const sat::Solvable &solv_r) const