12#ifndef ZYPP_POOLITEMBEST_H
13#define ZYPP_POOLITEMBEST_H
17#include <zypp/base/PtrTypes.h>
18#include <zypp/base/Function.h>
19#include <zypp/base/Iterator.h>
20#include <zypp/base/Hash.h>
65 typedef std::unordered_map<IdString,PoolItem>
Container;
93 template<
class TIterator>
94 PoolItemBest( TIterator begin_r, TIterator end_r,
bool preferNotLocked_r =
false )
106 template<
class TIterator>
107 void add( TIterator begin_r, TIterator end_r )
109 for_( it, begin_r, end_r )
RepoManager implementation.
Access to the sat-pools string space.
Find the best candidates e.g.
Container::size_type size_type
RWCOW_pointer< Impl > & pimpl()
Pointer to implementation.
size_type size() const
Number of PoolItems collected.
ident_iterator identEnd() const
Pointer behind the last item.
const RWCOW_pointer< Impl > & pimpl() const
Pointer to implementation.
std::unordered_map< IdString, PoolItem > Container
PoolItemBest(const PoolItem &pi_r, bool preferNotLocked_r=false)
Ctor feeding a PoolItem.
shared_ptr< void > _dont_use_this_use_pimpl
Avoid need to include Impl definition when inlined ctors (due to tepmlate) are provided.
PoolItem find(const PoolItem &pi_r) const
Container::value_type value_type
PoolItemBest(TIterator begin_r, TIterator end_r, bool preferNotLocked_r=false)
Ctor feeding a range of sat::Solvable or PoolItem.
const Container & container() const
PoolItem find(IdString ident_r) const
Return the collected PoolItem with sat::Solvable::ident ident_r.
void _ctor_init()
bin.compat legacy
iterator begin() const
Pointer to the first PoolItem.
bool empty() const
Whether PoolItems were collected.
MapKVIteratorTraits< Container >::Key_const_iterator ident_iterator
iterator end() const
Pointer behind the last PoolItem.
void add(TIterator begin_r, TIterator end_r)
Feed a range of sat::Solvable or PoolItem.
MapKVIteratorTraits< Container >::Value_const_iterator iterator
static constexpr bool preferNotLocked
Indicator argument for ctor: consider locked packages less than not locked packages.
PoolItemBest(bool preferNotLocked_r=false)
Default ctor.
void add(sat::Solvable slv_r)
Feed one sat::Solvable.
PoolItemBest(sat::Solvable slv_r, bool preferNotLocked_r=false)
Ctor feeding a sat::Solvable.
PoolItem find(sat::Solvable slv_r) const
boost::function< bool(const PoolItem &lhs, const PoolItem &rhs)> Predicate
Predicate returning True if lhs is a better choice.
ident_iterator identBegin() const
Pointer to the first item.
Combining sat::Solvable and ResStatus.
A Solvable object within the sat Pool.
IdString ident() const
The identifier.
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
MapKVIteratorTraits< TMap >::Key_const_iterator make_map_key_begin(const TMap &map_r)
Convenience to create the key iterator from container::begin()
MapKVIteratorTraits< TMap >::Value_const_iterator make_map_value_begin(const TMap &map_r)
Convenience to create the value iterator from container::begin()
MapKVIteratorTraits< TMap >::Key_const_iterator make_map_key_end(const TMap &map_r)
Convenience to create the key iterator from container::end()
MapKVIteratorTraits< TMap >::Value_const_iterator make_map_value_end(const TMap &map_r)
Convenience to create the value iterator from container::end()
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
transform_iterator< GetPairFirst< typename MapType::value_type >, typename MapType::const_iterator > Key_const_iterator
The key iterator type.
transform_iterator< GetPairSecond< typename MapType::value_type >, typename MapType::const_iterator > Value_const_iterator
The value iterator type.
RW_pointer supporting 'copy on write' functionality.
Solvable satSolvable() const
Return the corresponding sat::Solvable.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.