libzypp 17.31.23
zypp::detail::PoolQueryMatcher Class Reference

Store PoolQuery settings and assist PoolQueryIterator. More...

Public Types

typedef sat::LookupAttr::iterator base_iterator

Public Member Functions

const base_iteratorend () 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
 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.

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

Definition at line 1530 of file

Member Typedef Documentation

◆ base_iterator

Constructor & Destructor Documentation

◆ PoolQueryMatcher()

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

Ctor stores the PoolQuery settings.

MatchExceptionAny of the exceptions thrown by PoolQuery::Impl::compile.

Definition at line 1616 of file

◆ ~PoolQueryMatcher()

zypp::detail::PoolQueryMatcher::~PoolQueryMatcher ( )

Definition at line 1647 of file

Member Function Documentation

◆ end()

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

Definition at line 1536 of file

◆ advance()

bool zypp::detail::PoolQueryMatcher::advance ( base_iterator base_r) const

Definition at line 1542 of file

◆ matchDetail()

void zypp::detail::PoolQueryMatcher::matchDetail ( const base_iterator base_r,
std::vector< base_iterator > &  return_r 
) const

Provide all matching attributes within this solvable.

Definition at line 1565 of file

◆ startNewQyery()

base_iterator zypp::detail::PoolQueryMatcher::startNewQyery ( ) const

Initialize a new base query.

Definition at line 1652 of file

◆ isAMatch()

bool zypp::detail::PoolQueryMatcher::isAMatch ( base_iterator base_r) const

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.

: Caller asserts we're not at end.

Definition at line 1692 of file

Member Data Documentation

◆ _repos

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

Repositories include in the search.

Definition at line 1788 of file

◆ _neverMatchRepo

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

Definition at line 1789 of file

◆ _kinds

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

Resolvable kinds to include.

Definition at line 1791 of file

◆ _op

Rel zypp::detail::PoolQueryMatcher::_op

Edition filter.

Definition at line 1793 of file

◆ _edition

Edition zypp::detail::PoolQueryMatcher::_edition

Definition at line 1794 of file

◆ _status_flags

int zypp::detail::PoolQueryMatcher::_status_flags

Installed status filter flags.

See also

Definition at line 1796 of file

◆ _attrMatchList

AttrMatchList zypp::detail::PoolQueryMatcher::_attrMatchList

StrMatcher per attribtue.

Definition at line 1798 of file

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