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. More...
 
void initRequestedLocales (const LocaleSet &locales_r)
 Start tracking changes based on this locales_r. More...
 
const LocaleSetgetAddedRequestedLocales () const
 Added since last initRequestedLocales. More...
 
const LocaleSetgetRemovedRequestedLocales () const
 Removed since last initRequestedLocales. More...
 
const LocaleSetgetRequestedLocales () const
 Current set of requested Locales. More...
 
bool isRequestedLocale (const Locale &locale_r) const
 
void setRequestedLocales (const LocaleSet &locales_r)
 User change (tracked). More...
 
bool addRequestedLocale (const Locale &locale_r)
 User change (tracked). More...
 
bool eraseRequestedLocale (const Locale &locale_r)
 User change (tracked). More...
 
const LocaleSetgetAvailableLocales () const
 All Locales occurring in any repo. More...
 
void onReset (Pool &pool) override
 
bool isAvailableLocale (const Locale &locale_r) const
 
const TrackedLocaleIdstrackedLocaleIds () const
 Expanded _requestedLocalesTracker for solver. More...
 
- Public Member Functions inherited from zyppng::sat::NamespaceProvider
virtual ~NamespaceProvider ()=default
 
virtual void checkDirty (Pool &)
 checkDirty More...
 
virtual void prepare (Pool &)
 prepare More...
 
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. More...
 
- 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

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
valueThe 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: