libzypp 17.37.10

zypp::sat::LookupRepoAttr Class Reference

Lightweight repository attribute value lookup. More...

`#include <zypp/sat/LookupAttr.h>`

Inheritance diagram for zypp::sat::LookupRepoAttr:

## Public Member Functions
| LookupRepoAttr ()
| Default ctor finds nothing.
| LookupRepoAttr (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 zypp::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 (SolvAttr attr_r, Location=SOLV_ATTR)
| Lookup SolvAttr in Pool (all repositories).
| LookupAttr (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 zypp::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
Related Symbols inherited from zypp::sat::LookupAttr
std::ostream & | operator<< (std::ostream &str, const LookupAttr &obj) ZYPP_API
| Stream output.
std::ostream & | dumpOn (std::ostream &str, const LookupAttr &obj) ZYPP_API
| Verbose stream output including the query result.
std::ostream & | operator<< (std::ostream &str, const LookupAttr::iterator &obj) ZYPP_API
| Stream output.
template<class TResult, class TAttr>
std::ostream & | operator<< (std::ostream &str, const ArrayAttr< TResult, TAttr > &obj)
| Stream output.

## 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( sat::SolvAttr::repositoryAddedFileProvides, sat::LookupAttr::REPO_ATTR );
// Equivalent but using LookupRepoAttr:
sat::LookupRepoAttr q( sat::SolvAttr::repositoryAddedFileProvides );
zypp::sat::LookupAttr
Lightweight attribute value lookup.
Definition LookupAttr.h:110
zypp::sat::LookupAttr::REPO_ATTR
@ REPO_ATTR
Search for repository attributes.
Definition LookupAttr.h:120
zypp::sat::LookupRepoAttr
Lightweight repository attribute value lookup.
Definition LookupAttr.h:265
zypp::sat::SolvAttr::repositoryAddedFileProvides
static const SolvAttr repositoryAddedFileProvides
Definition SolvAttr.h:182

See also
  LookupAttr

Definition at line 264 of file LookupAttr.h.

## Constructor & Destructor Documentation

## ◆ LookupRepoAttr() [1/3]

zypp::sat::LookupRepoAttr::LookupRepoAttr | ( |  | ) |
| inline

Default ctor finds nothing.

Definition at line 268 of file LookupAttr.h.

## ◆ LookupRepoAttr() [2/3]

zypp::sat::LookupRepoAttr::LookupRepoAttr | ( | SolvAttr | attr_r | ) |
| inline explicit

Definition at line 271 of file LookupAttr.h.

## ◆ LookupRepoAttr() [3/3]

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

Definition at line 284 of file LookupAttr.cc.

## Member Function Documentation

## ◆ setPool()

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

Set search in Pool (all repositories).

Definition at line 279 of file LookupAttr.h.

## ◆ setRepo()

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

Set search in one Repository.

Definition at line 288 of file LookupAttr.cc.

## ◆ solvable()

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

Whether to search in one Solvable.

Definition at line 220 of file LookupAttr.cc.

## ◆ setSolvable()

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

Set search in one Solvable.

Definition at line 223 of file LookupAttr.cc.

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

- zypp/sat/LookupAttr.h
- zypp/sat/LookupAttr.cc