libzypp: zyppng::sat::LookupRepoAttr Class Reference

libzypp 17.38.14

zyppng::sat::LookupRepoAttr Class Reference

Lightweight repository attribute value lookup. More...

`#include <zypp/ng/sat/lookupattr.h>`

Inheritance diagram for zyppng::sat::LookupRepoAttr:

## Public Member Functions
| LookupRepoAttr ()
| Default ctor finds nothing.
| LookupRepoAttr (Pool &pool, SolvAttr attr_r)
| LookupRepoAttr (SolvAttr attr_r, Repository repo_r)
void | setPool ()
| Set search in Pool (all repositories).
void | setRepo (Repository repo_r)
| Set search in one Repository.
Public Member Functions inherited from zyppng::sat::LookupAttr
| LookupAttr ()
| Default ctor finds nothing.
| LookupAttr (const LookupAttr &)=default
| LookupAttr (LookupAttr &&) noexcept=default
LookupAttr & | operator= (const LookupAttr &)=default
LookupAttr & | operator= (LookupAttr &&) noexcept=default
| LookupAttr (Pool &pool, SolvAttr attr_r, Location=SOLV_ATTR)
| Lookup SolvAttr in Pool (all repositories).
| LookupAttr (Pool &pool, SolvAttr attr_r, SolvAttr parent_r, Location=SOLV_ATTR)
| LookupAttr (SolvAttr attr_r, Repository repo_r, Location=SOLV_ATTR)
| Lookup SolvAttr in oneRepository.
| LookupAttr (SolvAttr attr_r, SolvAttr parent_r, Repository repo_r, Location=SOLV_ATTR)
| LookupAttr (SolvAttr attr_r, Solvable solv_r)
| Lookup SolvAttr in one Solvable.
| LookupAttr (SolvAttr attr_r, SolvAttr parent_r, Solvable solv_r)
iterator | begin () const
| Iterator to the begin of query results.
iterator | end () const
| Iterator behind the end of query results.
bool | empty () const
| Whether the query is empty.
size_type | size () const
| Ammount of results.
SolvAttr | attr () const
| The SolvAttr to search.
void | setAttr (SolvAttr attr_r)
| Set the SolvAttr to search.
const StrMatcher & | strMatcher () const
| The pattern to match.
void | setStrMatcher (const StrMatcher &matcher_r)
| Set the pattern to match.
void | resetStrMatcher ()
| Reset the pattern to match.
bool | pool () const
| Whether to search in Pool.
void | setPool (Location=SOLV_ATTR)
| Set search in Pool (all repositories).
Repository | repo () const
| Whether to search in one Repository.
void | setRepo (Repository repo_r, Location=SOLV_ATTR)
| Set search in one Repository.
Solvable | solvable () const
| Whether to search in one Solvable.
void | setSolvable (Solvable solv_r)
| Set search in one Solvable.
SolvAttr | parent () const
| Whether to search within a sub-structure (SolvAttr::noAttr if not).
void | setParent (SolvAttr attr_r)
| Set search within a sub-structure (SolvAttr::noAttr for none).

## Private Member Functions
Solvable | solvable () const
| Whether to search in one Solvable.
void | setSolvable (Solvable solv_r)
| Set search in one Solvable.

## Additional Inherited Members
Public Types inherited from zyppng::sat::LookupAttr
enum | Location { SOLV_ATTR = 0 , REPO_ATTR = -1 }
| Specify the where to look for the attribule. More...
using | Exception = MatchException
using | size_type = unsigned int

## Detailed Description

Lightweight repository attribute value lookup.

This is just a convenience class that overloads all LookupAttr methods which take a LookupAttr::Location argument and sets it to REPO_ATTR.

// look for a repo attribute in the pool:
sat::LookupAttr p( pool, sat::SolvAttr::repositoryAddedFileProvides, sat::LookupAttr::REPO_ATTR );
// Equivalent but using LookupRepoAttr:
sat::LookupRepoAttr q( pool, sat::SolvAttr::repositoryAddedFileProvides );
zyppng::sat::LookupAttr
Lightweight attribute value lookup.
Definition lookupattr.h:114
zyppng::sat::LookupAttr::pool
bool pool() const
Whether to search in Pool.
Definition lookupattr.cc:216
zyppng::sat::LookupAttr::REPO_ATTR
@ REPO_ATTR
Search for repository attributes.
Definition lookupattr.h:124
zyppng::sat::LookupRepoAttr
Lightweight repository attribute value lookup.
Definition lookupattr.h:259
zyppng::sat::SolvAttr::repositoryAddedFileProvides
static const SolvAttr repositoryAddedFileProvides
Definition SolvAttr.h:182

See also
  LookupAttr

Definition at line 258 of file lookupattr.h.

## Constructor & Destructor Documentation

## ◆ LookupRepoAttr() [1/3]

zyppng::sat::LookupRepoAttr::LookupRepoAttr | ( |  | ) |
| inline

Default ctor finds nothing.

CLASS NAME : LookupAttr.

Definition at line 262 of file lookupattr.h.

## ◆ LookupRepoAttr() [2/3]

zyppng::sat::LookupRepoAttr::LookupRepoAttr | ( | Pool & | pool,
|  | SolvAttr | attr_r )
| inlineexplicit

Definition at line 265 of file lookupattr.h.

## ◆ LookupRepoAttr() [3/3]

zyppng::sat::LookupRepoAttr::LookupRepoAttr | ( | SolvAttr | attr_r,
|  | Repository | repo_r )
| explicit

CLASS NAME : LookupRepoAttr.

Definition at line 261 of file lookupattr.cc.

## Member Function Documentation

## ◆ setPool()

void zyppng::sat::LookupRepoAttr::setPool | ( |  | ) |
| inline

Set search in Pool (all repositories).

Definition at line 273 of file lookupattr.h.

## ◆ setRepo()

void zyppng::sat::LookupRepoAttr::setRepo | ( | Repository | repo_r | ) |

Set search in one Repository.

Definition at line 265 of file lookupattr.cc.

## ◆ solvable()

Solvable zyppng::sat::LookupAttr::solvable | ( |  | ) | const
| private

Whether to search in one Solvable.

Definition at line 224 of file lookupattr.cc.

## ◆ setSolvable()

void zyppng::sat::LookupAttr::setSolvable | ( | Solvable | solv_r | ) |
| private

Set search in one Solvable.

Definition at line 227 of file lookupattr.cc.

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

- zypp/ng/sat/lookupattr.h
- zypp/ng/sat/lookupattr.cc