12 #ifndef ZYPP_POOLITEMBEST_H
13 #define ZYPP_POOLITEMBEST_H
62 typedef std::tr1::unordered_map<IdString,PoolItem>
Container;
65 typedef boost::function<bool ( const PoolItem & lhs, const PoolItem & rhs )>
Predicate;
86 template<
class _Iterator>
99 template<
class _Iterator>
100 void add( _Iterator begin_r, _Iterator end_r )
102 for_( it, begin_r, end_r )
155 #endif // ZYPP_POOLITEMBEST_H
Container::value_type value_type
A Solvable object within the sat Pool.
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.
MapKVIteratorTraits< _Map >::Value_const_iterator make_map_value_end(const _Map &map_r)
Convenience to create the value iterator from container::end()
iterator begin() const
Pointer to the first PoolItem.
Container::size_type size_type
ident_iterator identBegin() const
Pointer to the first item.
boost::function< bool(const PoolItem &lhs, const PoolItem &rhs)> Predicate
Predicate returning True if lhs is a better choice.
transform_iterator< GetPairFirst< typename MapType::value_type >, typename MapType::const_iterator > Key_const_iterator
The key iterator type.
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(_Iterator begin_r, _Iterator end_r)
Ctor feeding a range of sat::Solvable or PoolItem.
transform_iterator< GetPairSecond< typename MapType::value_type >, typename MapType::const_iterator > Value_const_iterator
The value iterator type.
std::tr1::unordered_map< IdString, PoolItem > Container
MapKVIteratorTraits< Container >::Value_const_iterator iterator
PoolItem find(IdString ident_r) const
Return the collected PoolItem with sat::Solvable::ident ident_r.
PoolItemBest(const PoolItem &pi_r)
Ctor feeding a PoolItem.
MapKVIteratorTraits< _Map >::Value_const_iterator make_map_value_begin(const _Map &map_r)
Convenience to create the value iterator from container::begin()
std::ostream & operator<<(std::ostream &str, const Exception &obj)
MapKVIteratorTraits< Container >::Key_const_iterator ident_iterator
const RWCOW_pointer< Impl > & pimpl() const
Pointer to implementation.
Find the best candidates e.g.
MapKVIteratorTraits< _Map >::Key_const_iterator make_map_key_begin(const _Map &map_r)
Convenience to create the key iterator from container::begin()
void add(_Iterator begin_r, _Iterator end_r)
Feed a range of sat::Solvable or PoolItem.
ident_iterator identEnd() const
Pointer behind the last item.
const Container & container() const
PoolItemBest()
Default ctor.
PoolItem find(sat::Solvable slv_r) const
sat::Solvable satSolvable() const
Return the corresponding sat::Solvable.
RWCOW_pointer< Impl > & pimpl()
Pointer to implementation.
Reference to a PoolItem connecting ResObject and ResStatus.
void add(sat::Solvable slv_r)
Feed one sat::Solvable.
iterator end() const
Pointer behind the last PoolItem.
MapKVIteratorTraits< _Map >::Key_const_iterator make_map_key_end(const _Map &map_r)
Convenience to create the key iterator from container::end()
PoolItem find(const PoolItem &pi_r) const
PoolItemBest(sat::Solvable slv_r)
Ctor feeding a sat::Solvable.
RW_pointer supporting 'copy on write' functionality.