38 if ( ! ident_r.
empty() )
44 if ( ! provides_r.
empty() &&
_provides.insert( provides_r ).second )
84 for (
const auto & solv : *
_cache ) {
85 if ( solv.isSystem() )
124 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
127 {
return new Impl( *
this ); }
133 str <<
"SolvableSpec {" << endl
134 <<
" Idents " << obj.
idents() << endl
135 <<
" Provides " << obj.
provides() << endl
170 [
this](
int num_r,
const std::string & line_r )->
bool
172 this->
parse( line_r );
179 std::vector<std::string> v;
203 {
return str << *obj.
_pimpl; }
bool dirty() const
Whether the cache is needed and dirty.
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.
void splitParseFrom(const C_Str &multispec_r)
Convenience using str::splitEscaped(", \t") to parse multiple specs from one line.
A Solvable object within the sat Pool.
Container of Solvable providing a Capability (read only).
IdString ident() const
The identifier.
const IdStringSet & idents() const
bool contains(const TSolv &solv_r) const
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
bool addIdenticalInstalledToo() const
Extend the provides set to include idential installed items as well.
const WhatProvides & cache() const
void parse(const C_Str &spec_r)
Parse and add spec from a string (IDENT or provides:CAPABILITY`).
SolvableSpec()
Default ctor.
static const ResKind srcpackage
Access to the sat-pools string space.
bool addIdenticalInstalledToo() const
void addIdent(IdString ident_r)
void parse(const C_Str &spec_r)
bool contains(const sat::Solvable &solv_r) const
Test whether solv_r matches the spec.
void addIdent(IdString ident_r)
Add all sat::Solvable with this ident_r.
Define a set of Solvables by ident and provides.
void setDirty() const
Explicitly flag the cache as dirty, so it will be rebuilt on the next request.
int simpleParseFile(std::istream &str_r, ParseFlags flags_r, function< bool(int, std::string)> consume_r)
Simple lineparser optionally trimming and skipping comments.
Impl * clone() const
clone for RWCOW_pointer
std::unordered_set< IdString > IdStringSet
void addIdenticalInstalledToo(bool yesno_r)
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string...
void parseFrom(const InputStream &istr_r)
Parse file istr_r and add it's specs (one per line, #-comments).
bool empty() const
Whether the Capability is empty.
SolvableSpec implementation.
bool contains(const sat::Solvable &solv_r) const
constexpr bool empty() const
Whether the string is empty.
void addProvides(Capability provides_r)
A all sat::Solvable matching this provides_r.
bool empty() const
Whether neither idents nor provides are set.
shared_ptr< WhatProvides > _cache
std::unordered_set< Capability > CapabilitySet
static Ptr get(const pool::ByIdent &ident_r)
Get the Selctable.
bool _addIdenticalInstalledToo
const CapabilitySet & provides() const
bool contains(const TSolv &solv_r) const
Whether collection contains a specific Solvable.
const char * c_str() const
bool containsProvides(const Capability &provides_r) const
Whether provides_r has been added to the sepcs (mainly for parser tests).
void clear()
Clear the container.
std::ostream & operator<<(std::ostream &str, const SolvableSpec::Impl &obj)
Combining sat::Solvable and ResStatus.
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
bool hasPrefix(const C_Str &str_r, const C_Str &prefix_r)
Return whether str_r has prefix prefix_r.
bool containsIdent(const IdString &ident_r) const
Whether ident_r has been added to the specs (mainly for parser tests).
SolvableSet _cacheIdenticalInstalled
RWCOW_pointer< Impl > _pimpl
Implementation class.
void addProvides(Capability provides_r)
bool insert(const TSolv &solv_r)
Insert a Solvable.
Solvable set wrapper to allow adding additional convenience iterators.