14#include <zypp/base/LogTools.h>
16#include <zypp/sat/detail/PoolImpl.h>
52 Impl(
const std::unordered_set<detail::IdType> & ids_r )
56 _pdata.reserve( ids_r.size()+1 );
57 _pdata.insert(
_pdata.begin(), ids_r.begin(), ids_r.end() );
68 std::vector<sat::detail::IdType>
_pdata;
77 template <
class Iterator>
78 void collectProviders( Iterator begin_r, Iterator end_r, std::unordered_set<detail::IdType> & collect_r )
80 for_( it, begin_r, end_r )
85 collect_r.insert( prv->id() );
99 unsigned res(
myPool().whatProvides( cap_r ) );
100 if (
myPool().whatProvidesData( res ) )
109 std::unordered_set<detail::IdType> ids;
110 collectProviders( caps_r.
begin(), caps_r.
end(), ids );
120 std::unordered_set<detail::IdType> ids;
121 collectProviders( caps_r.begin(), caps_r.end(), ids );
174 str <<
str::form(
"<%p(%p)>", obj.base_reference(), &obj.base_reference() );
Container of Capability (currently read only).
const_iterator begin() const
Iterator pointing to the first Capability.
const_iterator end() const
Iterator pointing behind the last Capability.
WhatProvides implementation date.
std::vector< sat::detail::IdType > _pdata
Impl(const std::unordered_set< detail::IdType > &ids_r)
const detail::IdType * _private
Container of Solvable providing a Capability (read only).
RW_pointer< Impl > _pimpl
const_iterator end() const
Iterator pointing behind the last Solvable.
bool empty() const
Whether the container is empty.
detail::WhatProvidesIterator const_iterator
WhatProvides()
Default ctor.
const_iterator begin() const
Iterator pointing to the first Solvable.
size_type size() const
Number of solvables inside.
const detail::IdType *const * _baseRef
String related utilities and Regular expression matching.
static const IdType noId(0)
int IdType
Generic Id type.
std::ostream & operator<<(std::ostream &str, const DIWrap &obj)
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
Easy-to use interface to the ZYPP dependency resolver.
std::unordered_set< Capability > CapabilitySet
std::ostream & dumpRange(std::ostream &str, TIterator begin, TIterator end, const std::string &intro="{", const std::string &pfx="\n ", const std::string &sep="\n ", const std::string &sfx="\n", const std::string &extro="}")
Print range defined by iterators (multiline style).
Backlink to the associated PoolImpl.
static PoolImpl & myPool()
#define for_(IT, BEG, END)
Convenient for-loops using iterator.