libzypp: zyppng::sat::namespaces::LanguageNamespaceProvider Class Reference

libzypp 17.38.7

zyppng::sat::namespaces::LanguageNamespaceProvider Class Reference

Provider for NAMESPACE_LANGUAGE. More...

`#include <zypp/ng/sat/namespaces/language.h>`

Inheritance diagram for zyppng::sat::namespaces::LanguageNamespaceProvider:

## Public Types
using | TrackedLocaleIds = base::SetTracker<IdStringSet>

## Public Member Functions
| LanguageNamespaceProvider ()=default
bool | isSatisfied (detail::IdType value) const override
| Check if a specific value satisfies this namespace condition.
void | initRequestedLocales (const LocaleSet &locales_r)
| Start tracking changes based on this locales_r.
const LocaleSet & | getAddedRequestedLocales () const
| Added since last initRequestedLocales.
const LocaleSet & | getRemovedRequestedLocales () const
| Removed since last initRequestedLocales.
const LocaleSet & | getRequestedLocales () const
| Current set of requested Locales.
bool | isRequestedLocale (const Locale &locale_r) const
void | setRequestedLocales (const LocaleSet &locales_r)
| User change (tracked).
bool | addRequestedLocale (const Locale &locale_r)
| User change (tracked).
bool | eraseRequestedLocale (const Locale &locale_r)
| User change (tracked).
const LocaleSet & | getAvailableLocales () const
| All Locales occurring in any repo.
void | onReset (Pool &pool) override
bool | isAvailableLocale (const Locale &locale_r) const
const TrackedLocaleIds & | trackedLocaleIds () const
| Expanded _requestedLocalesTracker for solver.
Public Member Functions inherited from zyppng::sat::NamespaceProvider
virtual | ~NamespaceProvider ()=default
virtual void | checkDirty (Pool &)
| checkDirty
virtual void | prepare (Pool &)
| prepare
virtual void | attach (Pool &pool)

## Private Member Functions
void | localeSetDirty (std::initializer_list< std::string_view > reasons)

## Private Attributes
base::SetTracker< LocaleSet > | _requestedLocalesTracker
std::unique_ptr< TrackedLocaleIds > | _trackedLocaleIdsPtr
std::unique_ptr< LocaleSet > | _availableLocalesPtr

## Additional Inherited Members
Protected Member Functions inherited from zyppng::sat::NamespaceProvider
void | notifyDirty (PoolInvalidation invalidationLevel, std::initializer_list< std::string_view > reasons)
| Notify the attached registry/pool that data has changed.
Protected Attributes inherited from zyppng::sat::NamespaceProvider
Pool * | _pool = nullptr

## Detailed Description

Provider for NAMESPACE_LANGUAGE.

Matches against requested locales and their fallbacks.

Definition at line 30 of file language.h.

## Member Typedef Documentation

## ◆ TrackedLocaleIds

using zyppng::sat::namespaces::LanguageNamespaceProvider::TrackedLocaleIds = base::SetTracker<IdStringSet>

Definition at line 75 of file language.h.

## Constructor & Destructor Documentation

## ◆ LanguageNamespaceProvider()

zyppng::sat::namespaces::LanguageNamespaceProvider::LanguageNamespaceProvider | ( |  | ) |
| default

## Member Function Documentation

## ◆ isSatisfied()

bool zyppng::sat::namespaces::LanguageNamespaceProvider::isSatisfied | ( | detail::IdType | value | ) | const
| overridevirtual

Check if a specific value satisfies this namespace condition.

Parameters

  value | The id value to check (e.g., "en_US" for a locale namespace).

Returns
  True if the condition is met, false otherwise.

This method is typically called via the libsolv namespace callback during dependency resolution.

Reimplemented from zyppng::sat::NamespaceProvider.

Definition at line 22 of file language.cc.

## ◆ initRequestedLocales()

void zyppng::sat::namespaces::LanguageNamespaceProvider::initRequestedLocales | ( | const LocaleSet & | locales_r | ) |

Start tracking changes based on this locales_r.

Usually called on TargetInit.

Definition at line 28 of file language.cc.

## ◆ getAddedRequestedLocales()

const LocaleSet & zyppng::sat::namespaces::LanguageNamespaceProvider::getAddedRequestedLocales | ( |  | ) | const
| inline

Added since last initRequestedLocales.

Definition at line 42 of file language.h.

## ◆ getRemovedRequestedLocales()

const LocaleSet & zyppng::sat::namespaces::LanguageNamespaceProvider::getRemovedRequestedLocales | ( |  | ) | const
| inline

Removed since last initRequestedLocales.

Definition at line 46 of file language.h.

## ◆ getRequestedLocales()

const LocaleSet & zyppng::sat::namespaces::LanguageNamespaceProvider::getRequestedLocales | ( |  | ) | const
| inline

Current set of requested Locales.

Definition at line 50 of file language.h.

## ◆ isRequestedLocale()

bool zyppng::sat::namespaces::LanguageNamespaceProvider::isRequestedLocale | ( | const Locale & | locale_r | ) | const
| inline

Definition at line 53 of file language.h.

## ◆ setRequestedLocales()

void zyppng::sat::namespaces::LanguageNamespaceProvider::setRequestedLocales | ( | const LocaleSet & | locales_r | ) |

User change (tracked).

Definition at line 37 of file language.cc.

## ◆ addRequestedLocale()

bool zyppng::sat::namespaces::LanguageNamespaceProvider::addRequestedLocale | ( | const Locale & | locale_r | ) |

User change (tracked).

Definition at line 46 of file language.cc.

## ◆ eraseRequestedLocale()

bool zyppng::sat::namespaces::LanguageNamespaceProvider::eraseRequestedLocale | ( | const Locale & | locale_r | ) |

User change (tracked).

Definition at line 57 of file language.cc.

## ◆ getAvailableLocales()

const LocaleSet & zyppng::sat::namespaces::LanguageNamespaceProvider::getAvailableLocales | ( |  | ) | const

All Locales occurring in any repo.

Definition at line 142 of file language.cc.

## ◆ onReset()

void zyppng::sat::namespaces::LanguageNamespaceProvider::onReset | ( | Pool & | pool | ) |
| overridevirtual

Reimplemented from zyppng::sat::NamespaceProvider.

Definition at line 137 of file language.cc.

## ◆ isAvailableLocale()

bool zyppng::sat::namespaces::LanguageNamespaceProvider::isAvailableLocale | ( | const Locale & | locale_r | ) | const
| inline

Definition at line 68 of file language.h.

## ◆ trackedLocaleIds()

const LanguageNamespaceProvider::TrackedLocaleIds & zyppng::sat::namespaces::LanguageNamespaceProvider::trackedLocaleIds | ( |  | ) | const

Expanded _requestedLocalesTracker for solver.

Definition at line 68 of file language.cc.

## ◆ localeSetDirty()

void zyppng::sat::namespaces::LanguageNamespaceProvider::localeSetDirty | ( | std::initializer_list< std::string_view > | reasons | ) |
| inlineprivate

Definition at line 82 of file language.h.

## Member Data Documentation

## ◆ _requestedLocalesTracker

base::SetTracker<LocaleSet> zyppng::sat::namespaces::LanguageNamespaceProvider::_requestedLocalesTracker
| private

Definition at line 87 of file language.h.

## ◆ _trackedLocaleIdsPtr

std::unique_ptr<TrackedLocaleIds> zyppng::sat::namespaces::LanguageNamespaceProvider::_trackedLocaleIdsPtr
| mutableprivate

Definition at line 88 of file language.h.

## ◆ _availableLocalesPtr

std::unique_ptr<LocaleSet> zyppng::sat::namespaces::LanguageNamespaceProvider::_availableLocalesPtr
| mutableprivate

Definition at line 89 of file language.h.

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

- zypp/ng/sat/namespaces/language.h
- zypp/ng/sat/namespaces/language.cc