12#ifndef ZYPP_POOLQUERY_H
13#define ZYPP_POOLQUERY_H
34 class PoolQueryIterator;
93 using Kinds = std::set<ResKind>;
153 void addKind(
const ResKind & kind);
161 void addRepo(
const std::string &
repoalias);
166 void setComment(
const std::string & comment)
const;
168 void setComment(
const std::string & comment);
184 void setInstalledOnly();
186 void setUninstalledOnly();
188 void setStatusFilterFlags( StatusFilter flags );
202 void addString(
const std::string & value);
303 { addDependency(
attr, name,
Rel::EQ, edition, arch ); }
314 { addDependency(
attr, std::string(), op, edition ); }
317 { addDependency(
attr, std::string(), op, edition, arch ); }
321 { addDependency(
attr, std::string(),
Rel::EQ, edition ); }
324 { addDependency(
attr, std::string(),
Rel::EQ, edition, arch ); }
362 void setCaseSensitive(
bool value =
true );
369 void setFilesMatchFullPath(
bool value =
true );
372 { setFilesMatchFullPath( !value ); }
375 void setMatchExact();
377 void setMatchSubstring();
381 void setMatchRegex();
391 const StrContainer & strings()
const;
395 const AttrRawStrMap & attributes()
const;
399 const Kinds & kinds()
const;
401 const StrContainer & repos()
const;
403 const std::string & comment()
const;
406 const Rel editionRel()
const;
411 bool caseSensitive()
const;
414 bool filesMatchFullPath()
const;
417 {
return !filesMatchFullPath(); }
419 bool matchExact()
const;
420 bool matchSubstring()
const;
421 bool matchGlob()
const;
422 bool matchRegex()
const;
423 bool matchWord()
const;
429 {
return flags().mode(); }
431 StatusFilter statusFilterFlags()
const;
444 bool recover( std::istream &
str,
char delim =
'\n' );
455 void serialize( std::ostream &
str,
char delim =
'\n' )
const;
480 void setFlags(
const Match & flags );
506 class PoolQueryMatcher;
521 , sat::LookupAttr::iterator
522 , const sat::Solvable
523 , boost::forward_traversal_tag
524 , const sat::Solvable
527 using Matches = std::vector<sat::LookupAttr::iterator>;
597 friend class boost::iterator_core_access;
605 const Matches & matches()
const;
615 {
return str <<
obj.base(); }
RepoManager implementation.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Edition represents [epoch:]version[-release]
String matching option flags as used e.g.
Mode
Mode flags (mutual exclusive).
void addDependency(const sat::SolvAttr &attr, const Arch &arch)
void addDependency(const sat::SolvAttr &attr, const Edition &edition, const Arch &arch)
void setFilesMatchBasename(bool value=true)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool filesMatchBasename() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool operator!=(const PoolQuery &b) const
function< bool(const sat::Solvable &)> ProcessResolvable
std::map< sat::SolvAttr, StrContainer > AttrRawStrMap
void addDependency(const sat::SolvAttr &attr, const std::string &name, const Edition &edition, const Arch &arch)
Match::Mode matchMode() const
Returns string matching mode as enum.
void addDependency(const sat::SolvAttr &attr, const Rel &op, const Edition &edition, const Arch &arch)
const_iterator end() const
An iterator pointing to the end of the query result.
void addDependency(const sat::SolvAttr &attr, const std::string &name, const Arch &arch)
void addDependency(const sat::SolvAttr &attr, const Edition &edition)
std::set< std::string > StrContainer
void addDependency(const sat::SolvAttr &attr, const Rel &op, const Edition &edition)
StatusFilter
Installed status filter setters.
void addDependency(const sat::SolvAttr &attr)
std::set< ResKind > Kinds
void addDependency(const sat::SolvAttr &attr, const std::string &name, const Edition &edition)
void addDependency(const sat::SolvAttr &attr, const std::string &name)
PoolQuery iterator as returned by PoolQuery::begin.
sat::Solvable dereference() const
size_type matchesSize() const
Number of attribute matches.
matches_iterator matchesEnd() const
End of matches.
bool matchesEmpty() const
False unless this is the end iterator.
shared_ptr< Matches > _matches
matches_iterator matchesBegin() const
Begin of matches.
Matches::size_type size_type
shared_ptr< PoolQueryMatcher > _matcher
Matches::const_iterator matches_iterator
std::vector< sat::LookupAttr::iterator > Matches
std::ostream & operator<<(std::ostream &str, const PoolQueryIterator &obj)
Stream output.
PoolQueryIterator()
Default ctor is also end.
PoolQueryIterator(const shared_ptr< PoolQueryMatcher > &matcher_r)
\Ref PoolQuery ctor.
Base class providing common iterator types based on a Solvable iterator.
A Solvable object within the sat Pool.
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
bool operator<(const StrMatcher &lhs, const StrMatcher &rhs)
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
std::string asString(const Patch::Category &obj)
Wrapper for const correct access via Smart pointer types.
#define ZYPP_DEPRECATED
The ZYPP_DEPRECATED macro can be used to trigger compile-time warnings with gcc >= 3....