|
libzypp
9.1.2
|
Store PoolQuery settings and assist PoolQueryIterator. More...
Public Types | |
| typedef sat::LookupAttr::iterator | base_iterator |
Public Member Functions | |
| const base_iterator & | end () const |
| bool | advance (base_iterator &base_r) const |
| void | matchDetail (const base_iterator &base_r, std::vector< base_iterator > &return_r) const |
| Provide all matching attributes within this solvable. | |
| PoolQueryMatcher (const shared_ptr< const PoolQuery::Impl > &query_r) | |
| Ctor stores the PoolQuery settings. | |
| ~PoolQueryMatcher () | |
Private Member Functions | |
| base_iterator | startNewQyery () const |
| Initialize a new base query. | |
| bool | isAMatch (base_iterator &base_r) const |
| Check whether we are on a match. | |
Private Attributes | |
| std::set< Repository > | _repos |
| Repositories include in the search. | |
| DefaultIntegral< bool, false > | _neverMatchRepo |
| std::set< ResKind > | _kinds |
| Resolvable kinds to include. | |
| Rel | _op |
| Edition filter. | |
| Edition | _edition |
| int | _status_flags |
| Installed status filter flags. | |
| AttrMatchList | _attrMatchList |
| AttrMatcher per attribtue. | |
Store PoolQuery settings and assist PoolQueryIterator.
Basically the matcher performs a base query, which should preselect candidates for a match. And has some filter conditions on top of it. Query and fileter depend on the PoolQuery settings.
Matcher must be stateless, as it is shared between multiple PoolQueryIterator instances.
If base_iterator is at the end, advance moves it to the first match. Otherwise advance moves to the next match, or to the end, if there is no more match.
Definition at line 1425 of file PoolQuery.cc.
Definition at line 1428 of file PoolQuery.cc.
| zypp::detail::PoolQueryMatcher::PoolQueryMatcher | ( | const shared_ptr< const PoolQuery::Impl > & | query_r | ) | [inline] |
Ctor stores the PoolQuery settings.
| MatchException | Any of the exceptions thrown by PoolQuery::Impl::compile. |
Definition at line 1511 of file PoolQuery.cc.
References _attrMatchList, _edition, _kinds, _neverMatchRepo, zypp::Rel::_op, _op, _repos, _status_flags, for_, zypp::sat::Pool::instance(), and zypp::sat::Pool::reposFind().
| zypp::detail::PoolQueryMatcher::~PoolQueryMatcher | ( | ) | [inline] |
Definition at line 1542 of file PoolQuery.cc.
| const base_iterator& zypp::detail::PoolQueryMatcher::end | ( | ) | const [inline] |
Definition at line 1431 of file PoolQuery.cc.
Referenced by advance(), and matchDetail().
| bool zypp::detail::PoolQueryMatcher::advance | ( | base_iterator & | base_r | ) | const [inline] |
Definition at line 1437 of file PoolQuery.cc.
References end(), isAMatch(), zypp::sat::LookupAttr::iterator::nextSkipSolvable(), and startNewQyery().
| void zypp::detail::PoolQueryMatcher::matchDetail | ( | const base_iterator & | base_r, |
| std::vector< base_iterator > & | return_r | ||
| ) | const [inline] |
Provide all matching attributes within this solvable.
Definition at line 1460 of file PoolQuery.cc.
References _attrMatchList, zypp::sat::LookupAttr::begin(), zypp::sat::LookupAttr::empty(), zypp::sat::LookupAttr::end(), end(), for_, zypp::sat::LookupAttr::iterator::inSolvable(), predicate, zypp::sat::LookupAttr::setAttrMatcher(), and zypp::sat::LookupAttr::iterator::stayInThisSolvable().
| base_iterator zypp::detail::PoolQueryMatcher::startNewQyery | ( | ) | const [inline, private] |
Initialize a new base query.
Definition at line 1547 of file PoolQuery.cc.
References _attrMatchList, _neverMatchRepo, _repos, zypp::sat::SolvAttr::allAttr, zypp::sat::LookupAttr::begin(), zypp::sat::LookupAttr::end(), zypp::sat::LookupAttr::setAttr(), zypp::sat::LookupAttr::setAttrMatcher(), and zypp::sat::LookupAttr::setRepo().
Referenced by advance().
| bool zypp::detail::PoolQueryMatcher::isAMatch | ( | base_iterator & | base_r | ) | const [inline, private] |
Check whether we are on a match.
The check covers the whole Solvable, not just the current attribute base_r points to. If there's no match, also prepare base_r to advance appropriately. If there is a match, simply return true. advance always moves to the next Solvable if there was a match.
Definition at line 1587 of file PoolQuery.cc.
References _attrMatchList, _edition, _kinds, _op, _repos, _status_flags, zypp::Rel::ANY, zypp::sat::LookupAttr::begin(), zypp::compareByRel(), zypp::sat::LookupAttr::empty(), zypp::sat::LookupAttr::end(), for_, zypp::sat::LookupAttr::iterator::inRepo(), zypp::sat::LookupAttr::iterator::inSolvable(), zypp::PoolQuery::INSTALLED_ONLY, zypp::sat::LookupAttr::iterator::nextSkipRepo(), zypp::sat::LookupAttr::iterator::nextSkipSolvable(), predicate, and zypp::sat::LookupAttr::setAttrMatcher().
Referenced by advance().
std::set<Repository> zypp::detail::PoolQueryMatcher::_repos [private] |
Repositories include in the search.
Definition at line 1663 of file PoolQuery.cc.
Referenced by isAMatch(), PoolQueryMatcher(), and startNewQyery().
DefaultIntegral<bool,false> zypp::detail::PoolQueryMatcher::_neverMatchRepo [private] |
Definition at line 1664 of file PoolQuery.cc.
Referenced by PoolQueryMatcher(), and startNewQyery().
std::set<ResKind> zypp::detail::PoolQueryMatcher::_kinds [private] |
Resolvable kinds to include.
Definition at line 1666 of file PoolQuery.cc.
Referenced by isAMatch(), and PoolQueryMatcher().
Rel zypp::detail::PoolQueryMatcher::_op [private] |
Edition filter.
Definition at line 1668 of file PoolQuery.cc.
Referenced by isAMatch(), and PoolQueryMatcher().
Definition at line 1669 of file PoolQuery.cc.
Referenced by isAMatch(), and PoolQueryMatcher().
int zypp::detail::PoolQueryMatcher::_status_flags [private] |
Installed status filter flags.
Definition at line 1671 of file PoolQuery.cc.
Referenced by isAMatch(), and PoolQueryMatcher().
AttrMatchList zypp::detail::PoolQueryMatcher::_attrMatchList [private] |
AttrMatcher per attribtue.
Definition at line 1673 of file PoolQuery.cc.
Referenced by isAMatch(), matchDetail(), PoolQueryMatcher(), and startNewQyery().
1.7.6.1