12 #ifndef ZYPP_POOLITEMBEST_H
13 #define ZYPP_POOLITEMBEST_H
65 typedef std::unordered_map<IdString,PoolItem>
Container;
68 typedef boost::function<bool ( const PoolItem & lhs, const PoolItem & rhs )>
Predicate;
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 )
163 #endif // ZYPP_POOLITEMBEST_H
Container::value_type value_type
A Solvable object within the sat Pool.
void _ctor_init()
bin.compat legacy
std::unordered_map< IdString, PoolItem > Container
IdString ident() const
The identifier.
bool empty() const
Whether PoolItems were collected.
shared_ptr< void > _dont_use_this_use_pimpl
Avoid need to include Impl definition when inlined ctors (due to tepmlate) are provided.
iterator begin() const
Pointer to the first PoolItem.
Container::size_type size_type
ident_iterator identBegin() const
Pointer to the first item.
Helper filtering the files offered by a RepomdFileReader.
void add(TIterator begin_r, TIterator end_r)
Feed a range of sat::Solvable or PoolItem.
boost::function< bool(const PoolItem &lhs, const PoolItem &rhs)> Predicate
Predicate returning True if lhs is a better choice.
static constexpr bool preferNotLocked
Indicator argument for ctor: consider locked packages less than not locked packages.
transform_iterator< GetPairSecond< typename MapType::value_type >, typename MapType::const_iterator > Value_const_iterator
The value iterator type.
MapKVIteratorTraits< TMap >::Value_const_iterator make_map_value_begin(const TMap &map_r)
Convenience to create the value iterator from container::begin()
size_type size() const
Number of PoolItems collected.
Access to the sat-pools string space.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
PoolItemBest(bool preferNotLocked_r=false)
Default ctor.
MapKVIteratorTraits< Container >::Value_const_iterator iterator
PoolItem find(IdString ident_r) const
Return the collected PoolItem with sat::Solvable::ident ident_r.
MapKVIteratorTraits< TMap >::Key_const_iterator make_map_key_begin(const TMap &map_r)
Convenience to create the key iterator from container::begin()
std::ostream & operator<<(std::ostream &str, const Exception &obj)
MapKVIteratorTraits< Container >::Key_const_iterator ident_iterator
PoolItemBest(sat::Solvable slv_r, bool preferNotLocked_r=false)
Ctor feeding a sat::Solvable.
MapKVIteratorTraits< TMap >::Key_const_iterator make_map_key_end(const TMap &map_r)
Convenience to create the key iterator from container::end()
const RWCOW_pointer< Impl > & pimpl() const
Pointer to implementation.
PoolItemBest(TIterator begin_r, TIterator end_r, bool preferNotLocked_r=false)
Ctor feeding a range of sat::Solvable or PoolItem.
MapKVIteratorTraits< TMap >::Value_const_iterator make_map_value_end(const TMap &map_r)
Convenience to create the value iterator from container::end()
Find the best candidates e.g.
transform_iterator< GetPairFirst< typename MapType::value_type >, typename MapType::const_iterator > Key_const_iterator
The key iterator type.
ident_iterator identEnd() const
Pointer behind the last item.
const Container & container() const
Solvable satSolvable() const
Return the corresponding sat::Solvable.
PoolItem find(sat::Solvable slv_r) const
RWCOW_pointer< Impl > & pimpl()
Pointer to implementation.
Combining sat::Solvable and ResStatus.
void add(sat::Solvable slv_r)
Feed one sat::Solvable.
iterator end() const
Pointer behind the last PoolItem.
PoolItemBest(const PoolItem &pi_r, bool preferNotLocked_r=false)
Ctor feeding a PoolItem.
PoolItem find(const PoolItem &pi_r) const