libzypp 17.37.10

zypp::detail::PoolQueryMatcher Class Reference

Store PoolQuery settings and assist PoolQueryIterator. More...

## Public Types
using | base_iterator = sat::LookupAttr::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 PoolQueryMatcher &)=default
| PoolQueryMatcher (PoolQueryMatcher &&)=default
PoolQueryMatcher & | operator= (const PoolQueryMatcher &)=default
PoolQueryMatcher & | operator= (PoolQueryMatcher &&)=default
| 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
| StrMatcher per attribtue.

## Detailed Description

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.

Note
  The original implementation treated an empty search string as <it>"match always"</it>. We stay compatible.

Definition at line 1531 of file PoolQuery.cc.

## Member Typedef Documentation

## ◆ base_iterator

using zypp::detail::PoolQueryMatcher::base_iterator = sat::LookupAttr::iterator

Definition at line 1534 of file PoolQuery.cc.

## Constructor & Destructor Documentation

## ◆ PoolQueryMatcher() [1/3]

zypp::detail::PoolQueryMatcher::PoolQueryMatcher | ( | const PoolQueryMatcher & |  | ) |
| default

## ◆ PoolQueryMatcher() [2/3]

zypp::detail::PoolQueryMatcher::PoolQueryMatcher | ( | PoolQueryMatcher && |  | ) |
| default

## ◆ PoolQueryMatcher() [3/3]

zypp::detail::PoolQueryMatcher::PoolQueryMatcher | ( | const shared_ptr< const PoolQuery::Impl > & | query_r | ) |
| inline

Ctor stores the PoolQuery settings.

Exceptions

  MatchException | Any of the exceptions thrown by PoolQuery::Impl::compile.

Definition at line 1622 of file PoolQuery.cc.

## ◆ ~PoolQueryMatcher()

zypp::detail::PoolQueryMatcher::~PoolQueryMatcher | ( |  | ) |
| inline

Definition at line 1653 of file PoolQuery.cc.

## Member Function Documentation

## ◆ end()

const base_iterator & zypp::detail::PoolQueryMatcher::end | ( |  | ) | const
| inline

Definition at line 1537 of file PoolQuery.cc.

## ◆ advance()

bool zypp::detail::PoolQueryMatcher::advance | ( | base_iterator & | base_r | ) | const
| inline

Definition at line 1543 of file PoolQuery.cc.

## ◆ matchDetail()

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 1566 of file PoolQuery.cc.

## ◆ operator=() [1/2]

PoolQueryMatcher & zypp::detail::PoolQueryMatcher::operator= | ( | const PoolQueryMatcher & |  | ) |
| default

## ◆ operator=() [2/2]

PoolQueryMatcher & zypp::detail::PoolQueryMatcher::operator= | ( | PoolQueryMatcher && |  | ) |
| default

## ◆ startNewQyery()

base_iterator zypp::detail::PoolQueryMatcher::startNewQyery | ( |  | ) | const
| inline private

Initialize a new base query.

Definition at line 1658 of file PoolQuery.cc.

## ◆ isAMatch()

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.

Note
  : Caller asserts we're not at end.

Definition at line 1698 of file PoolQuery.cc.

## Member Data Documentation

## ◆ _repos

std::set<Repository> zypp::detail::PoolQueryMatcher::_repos
| private

Repositories include in the search.

Definition at line 1794 of file PoolQuery.cc.

## ◆ _neverMatchRepo

DefaultIntegral<bool,false> zypp::detail::PoolQueryMatcher::_neverMatchRepo
| private

Definition at line 1795 of file PoolQuery.cc.

## ◆ _kinds

std::set<ResKind> zypp::detail::PoolQueryMatcher::_kinds
| private

Resolvable kinds to include.

Definition at line 1797 of file PoolQuery.cc.

## ◆ _op

Rel zypp::detail::PoolQueryMatcher::_op
| private

Edition filter.

Definition at line 1799 of file PoolQuery.cc.

## ◆ _edition

Edition zypp::detail::PoolQueryMatcher::_edition
| private

Definition at line 1800 of file PoolQuery.cc.

## ◆ _status_flags

int zypp::detail::PoolQueryMatcher::_status_flags
| private

Installed status filter flags.

See also
  PoolQuery::StatusFilter

Definition at line 1802 of file PoolQuery.cc.

## ◆ _attrMatchList

AttrMatchList zypp::detail::PoolQueryMatcher::_attrMatchList
| private

StrMatcher per attribtue.

Definition at line 1804 of file PoolQuery.cc.

The documentation for this class was generated from the following file:

- zypp/PoolQuery.cc