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;
181 void setInstalledOnly();
183 void setUninstalledOnly();
185 void setStatusFilterFlags( StatusFilter flags );
199 void addString(
const std::string & value);
300 { addDependency(
attr, name,
Rel::EQ, edition, arch ); }
311 { addDependency(
attr, std::string(), op, edition ); }
314 { addDependency(
attr, std::string(), op, edition, arch ); }
318 { addDependency(
attr, std::string(),
Rel::EQ, edition ); }
321 { addDependency(
attr, std::string(),
Rel::EQ, edition, arch ); }
359 void setCaseSensitive(
bool value =
true );
366 void setFilesMatchFullPath(
bool value =
true );
369 { setFilesMatchFullPath( !value ); }
372 void setMatchExact();
374 void setMatchSubstring();
378 void setMatchRegex();
388 const StrContainer & strings()
const;
392 const AttrRawStrMap & attributes()
const;
396 const Kinds & kinds()
const;
398 const StrContainer & repos()
const;
400 const std::string & comment()
const;
403 const Rel editionRel()
const;
408 bool caseSensitive()
const;
411 bool filesMatchFullPath()
const;
414 {
return !filesMatchFullPath(); }
416 bool matchExact()
const;
417 bool matchSubstring()
const;
418 bool matchGlob()
const;
419 bool matchRegex()
const;
420 bool matchWord()
const;
426 {
return flags().mode(); }
428 StatusFilter statusFilterFlags()
const;
441 bool recover( std::istream &
str,
char delim =
'\n' );
452 void serialize( std::ostream &
str,
char delim =
'\n' )
const;
477 void setFlags(
const Match & flags );
503 class PoolQueryMatcher;
518 , sat::LookupAttr::iterator
519 , const sat::Solvable
520 , boost::forward_traversal_tag
521 , const sat::Solvable
524 using Matches = std::vector<sat::LookupAttr::iterator>;
594 friend class boost::iterator_core_access;
602 const Matches & matches()
const;
612 {
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....