libzypp: zypp::VendorAttr::Impl Class Reference

libzypp 17.38.14

zypp::VendorAttr::Impl Class Reference

VendorAttr implementation. More...

## Public Member Functions
| Impl ()
| Ctor.
void | addVendorList (VendorList &&vendorList_r)
| Add a new equivalent vendor set.
bool | equivalent (IdString lVendor, IdString rVendor) const
| Return whether two vendor strings should be treated as equivalent.
bool | relaxedEquivalent (IdString lVendor, IdString rVendor) const
| Return whether two vendor strings should be treated as equivalent or are (suse/opensuse).
unsigned | foreachVendorList (const std::function< bool(VendorList)> &fnc_r) const

## Private Types
using | VendorGroupMap = std::map<std::string,unsigned>
using | VendorMatchEntry = DefaultIntegral<unsigned int, 0>
using | VendorMatch = std::unordered_map<IdString, VendorMatchEntry>

## Private Member Functions
void | vendorMatchIdReset ()
| Reset vendor match cache if _vendorGroupMap was changed.
unsigned | vendorMatchId (IdString vendor) const
| Helper mapping a vendor string to its eqivalence class ID.
Impl * | clone () const
| clone for RWCOW_pointer

## Private Attributes
VendorGroupMap | _vendorGroupMap
| Vendor group definition. Equivalent groups share the same ID.
unsigned | _vendorGroupId = 0
| Highest group ID in use (incremented).
VendorMatch | _vendorMatch
| Cache mapping vendor strings to equivalence class ID.
unsigned | _nextId = 0
| Least equivalence class ID in use (decremented).

## Friends
std::ostream & | operator<< (std::ostream &str, const Impl &obj)
| relates: VendorAttr::Impl Stream output
Impl * | rwcowClone (const Impl *rhs)

## Detailed Description

VendorAttr implementation.

Definition at line 40 of file VendorAttr.cc.

## Member Typedef Documentation

## ◆ VendorGroupMap

using zypp::VendorAttr::Impl::VendorGroupMap = std::map<std::string,unsigned>
| private

Definition at line 97 of file VendorAttr.cc.

## ◆ VendorMatchEntry

using zypp::VendorAttr::Impl::VendorMatchEntry = DefaultIntegral<unsigned int, 0>
| private

Definition at line 102 of file VendorAttr.cc.

## ◆ VendorMatch

using zypp::VendorAttr::Impl::VendorMatch = std::unordered_map<IdString, VendorMatchEntry>
| private

Definition at line 103 of file VendorAttr.cc.

## Constructor & Destructor Documentation

## ◆ Impl()

zypp::VendorAttr::Impl::Impl | ( |  | ) |
| inline

Ctor.

bsc#1030686: The legacy default equivalence of 'suse' and 'opensuse' has been removed. bnc#812608: No prefix compare in opensuse namespace, so just create a class for 'suse*'

Definition at line 50 of file VendorAttr.cc.

## Member Function Documentation

## ◆ addVendorList()

void zypp::VendorAttr::Impl::addVendorList | ( | VendorList && | vendorList_r | ) |

Add a new equivalent vendor set.

Definition at line 173 of file VendorAttr.cc.

## ◆ equivalent()

bool zypp::VendorAttr::Impl::equivalent | ( | IdString | lVendor,
|  | IdString | rVendor ) const
| inline

Return whether two vendor strings should be treated as equivalent.

Definition at line 58 of file VendorAttr.cc.

## ◆ relaxedEquivalent()

bool zypp::VendorAttr::Impl::relaxedEquivalent | ( | IdString | lVendor,
|  | IdString | rVendor ) const
| inline

Return whether two vendor strings should be treated as equivalent or are (suse/opensuse).

Definition at line 62 of file VendorAttr.cc.

## ◆ foreachVendorList()

unsigned zypp::VendorAttr::Impl::foreachVendorList | ( | const std::function< bool(VendorList)> & | fnc_r | ) | const
| inline

Definition at line 78 of file VendorAttr.cc.

## ◆ vendorMatchIdReset()

void zypp::VendorAttr::Impl::vendorMatchIdReset | ( |  | ) |
| inlineprivate

Reset vendor match cache if _vendorGroupMap was changed.

Definition at line 108 of file VendorAttr.cc.

## ◆ vendorMatchId()

unsigned zypp::VendorAttr::Impl::vendorMatchId | ( | IdString | vendor | ) | const
| private

Helper mapping a vendor string to its eqivalence class ID.

- Return the vendor strings eqivalence class ID stored in _vendorMatch.
- If not found, assign and return the eqivalence class ID of the lowercased string.
- If not found, assign and return a new ID (look into the predefined VendorGroupMap (id>0), otherwise create a new ID (<0)).

Definition at line 130 of file VendorAttr.cc.

## ◆ clone()

Impl * zypp::VendorAttr::Impl::clone | ( |  | ) | const
| inlineprivate

clone for RWCOW_pointer

Definition at line 126 of file VendorAttr.cc.

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | str,
|  | const Impl & | obj )
| friend

relates: VendorAttr::Impl Stream output

Definition at line 215 of file VendorAttr.cc.

## ◆ rwcowClone

Impl * rwcowClone | ( | const Impl * | rhs | ) |
| friend

## Member Data Documentation

## ◆ _vendorGroupMap

VendorGroupMap zypp::VendorAttr::Impl::_vendorGroupMap
| private

Vendor group definition. Equivalent groups share the same ID.

Definition at line 98 of file VendorAttr.cc.

## ◆ _vendorGroupId

unsigned zypp::VendorAttr::Impl::_vendorGroupId = 0
| private

Highest group ID in use (incremented).

Definition at line 99 of file VendorAttr.cc.

## ◆ _vendorMatch

VendorMatch zypp::VendorAttr::Impl::_vendorMatch
| mutableprivate

Cache mapping vendor strings to equivalence class ID.

Definition at line 104 of file VendorAttr.cc.

## ◆ _nextId

unsigned zypp::VendorAttr::Impl::_nextId = 0
| mutableprivate

Least equivalence class ID in use (decremented).

Definition at line 105 of file VendorAttr.cc.

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

- zypp/VendorAttr.cc