36 if ( ! ident_r.
empty() )
42 if ( ! provides_r.
empty() &&
_provides.insert( provides_r ).second )
88 mutable shared_ptr<WhatProvides>
_cache;
91 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
94 {
return new Impl( *
this ); }
100 str <<
"SolvableSpec {" << endl
101 <<
" Idents " << obj.
idents() << endl
102 <<
" Provides " << obj.
provides() << endl
132 [
this](
int num_r,
const std::string & line_r )->
bool 134 this->
parse( line_r );
141 std::vector<std::string> v;
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).
const CapabilitySet & provides() const
const IdStringSet & idents() const
unsigned splitEscaped(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \, bool withEmpty=false)
Split line_r into words with respect to escape delimeters.
bool containsProvides(const Capability &provides_r) const
Whether provides_r has been added to the sepcs (mainly for parser tests).
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
String related utilities and Regular expression matching.
void parse(const C_Str &spec_r)
Parse and add spec from a string (IDENT or provides:CAPABILITY`).
bool isKind(const ResKind &kind_r) const
Test whether a Solvable is of a certain ResKind.
SolvableSpec()
Default ctor.
static const ResKind srcpackage
Access to the sat-pools string space.
const char * c_str() const
void addIdent(IdString ident_r)
void parse(const C_Str &spec_r)
void addIdent(IdString ident_r)
Add all sat::Solvable with this ident_r.
Define a set of Solvables by ident and provides.
bool dirty() const
Whether the cache is needed and dirty.
const WhatProvides & cache() const
constexpr bool empty() const
Whether the string is empty.
int simpleParseFile(std::istream &str_r, ParseFlags flags_r, function< bool(int, std::string)> consume_r)
Simple lineparser optionally trimming and skipping comments.
std::unordered_set< IdString > IdStringSet
void setDirty() const
Explicitly flag the cache as dirty, so it will be rebuilt on the next request.
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 contains(const sat::Solvable &solv_r) const
Test whether solv_r matches the spec.
SolvableSpec implementation.
void addProvides(Capability provides_r)
A all sat::Solvable matching this provides_r.
shared_ptr< WhatProvides > _cache
std::unordered_set< Capability > CapabilitySet
bool contains(const sat::Solvable &solv_r) const
Impl * clone() const
clone for RWCOW_pointer
std::ostream & operator<<(std::ostream &str, const SolvableSpec::Impl &obj)
Easy-to use interface to the ZYPP dependency resolver.
bool empty() const
Whether the Capability is empty.
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).
RWCOW_pointer< Impl > _pimpl
Implementation class.
void addProvides(Capability provides_r)
IdString ident() const
The identifier.
bool contains(const TSolv &solv_r) const
Whether collection contains a specific Solvable.