libzypp  15.28.6
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. More...
 
 PoolQueryMatcher (const shared_ptr< const PoolQuery::Impl > &query_r)
 Ctor stores the PoolQuery settings. More...
 
 ~PoolQueryMatcher ()
 

Private Member Functions

base_iterator startNewQyery () const
 Initialize a new base query. More...
 
bool isAMatch (base_iterator &base_r) const
 Check whether we are on a match. More...
 

Private Attributes

std::set< Repository_repos
 Repositories include in the search. More...
 
DefaultIntegral< bool, false > _neverMatchRepo
 
std::set< ResKind_kinds
 Resolvable kinds to include. More...
 
Rel _op
 Edition filter. More...
 
Edition _edition
 
int _status_flags
 Installed status filter flags. More...
 
AttrMatchList _attrMatchList
 StrMatcher per attribtue. More...
 

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

Member Typedef Documentation

Constructor & Destructor Documentation

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

Ctor stores the PoolQuery settings.

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

Definition at line 1540 of file PoolQuery.cc.

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

Definition at line 1571 of file PoolQuery.cc.

Member Function Documentation

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

Definition at line 1460 of file PoolQuery.cc.

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

Definition at line 1466 of file PoolQuery.cc.

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

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

Initialize a new base query.

Definition at line 1576 of file PoolQuery.cc.

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

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

Member Data Documentation

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

Repositories include in the search.

Definition at line 1712 of file PoolQuery.cc.

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

Definition at line 1713 of file PoolQuery.cc.

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

Resolvable kinds to include.

Definition at line 1715 of file PoolQuery.cc.

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

Edition filter.

Definition at line 1717 of file PoolQuery.cc.

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

Definition at line 1718 of file PoolQuery.cc.

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

Installed status filter flags.

See Also
PoolQuery::StatusFilter

Definition at line 1720 of file PoolQuery.cc.

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

StrMatcher per attribtue.

Definition at line 1722 of file PoolQuery.cc.


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