40 unsigned offset = ::pool_whatprovides( cpool, cap.id() );
54 static constexpr std::string_view providesPrefix {
"provides:" };
55 if ( spec_r.empty() || spec_r[0] ==
'#' )
57 if ( spec_r.substr( 0, providesPrefix.size() ) == providesPrefix )
66 [
this](
int ,
const std::string & line_r ) ->
bool {
74 std::vector<std::string> tokens;
76 std::back_inserter(tokens),
", \t" );
77 parseFrom( tokens.begin(), tokens.end() );
93 if ( !spec_r.
idents().empty() ) {
120 return _ids.count( solv_r.
id() ) != 0;
static const ResKind srcpackage
bool contains(const Solvable &solv_r) const
O(1) membership test — no pool access required.
EvaluatedSolvableSpec(PreparedPool &pp_r, const SolvableSpec &spec_r)
Construct by evaluating spec_r against pp_r.
Orchestrator for a libsolv pool instance.
detail::CPool * get() const
Expert backdoor.
detail::SolvableIdType getFirstId() const
Get id of the first valid Solvable.
detail::SolvableIdType getNextId(detail::SolvableIdType id_r) const
Get id of the next valid Solvable.
A move-only, non-owning view of a Pool that guarantees the whatprovides index is valid.
Pool & pool() const noexcept
Access the owning Pool.
detail::IdType whatProvidesData(unsigned offset_r) const
Returns the id stored at offset_r in the whatprovidesdata array.
unsigned whatProvidesCapabilityId(detail::IdType cap_r) const
Returns the offset into the internal whatprovidesdata array for cap_r.
detail::CPool * get() const noexcept
Expert backdoor — raw libsolv pool pointer.
A pure data container describing a set of solvables by ident and/or provides.
void parse(std::string_view spec_r)
Parse and add a single spec entry.
bool empty() const
Whether the spec has no idents and no provides tokens.
void parseFrom(const zypp::InputStream &istr_r)
Parse and add specs from istr_r (one per line; #-comments and empty lines are skipped automatically).
const CapabilitySet & provides() const
const IdStringSet & idents() const
void addIdent(IdString ident_r)
Add ident_r to the ident set.
bool contains(Pool &pool_r, const Solvable &solv_r) const
Test whether a single Solvable matches this spec.
void addProvides(Capability cap_r)
Add cap_r to the provides set.
void splitParseFrom(std::string_view multispec_r)
Split multispec_r on ',', ' ', '\t' and parse each token.
A Solvable object within the sat Pool.
IdString ident() const
The identifier.
IdType id() const
Expert backdoor.
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
int simpleParseFile(std::istream &str_r, ParseFlags flags_r, function< bool(int, std::string)> consume_r)
Simple lineparser optionally trimming and skipping comments.
unsigned splitEscaped(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \t", bool withEmpty=false)
Split line_r into words with respect to escape delimeters.
zypp::sat::detail::CPool CPool
zypp::sat::detail::SolvableIdType SolvableIdType
static const SolvableIdType noSolvableId(0)
Id to denote Solvable::noSolvable.
zypp::sat::detail::IdType IdType
This file contains private API, this might break at any time between releases.
bool isKind(const Solvable &solvable_r)
relates: Solvable Test whether a Solvable is of a certain Kind.
This file contains private API, this might break at any time between releases.