libzypp: zypp::CodeMaps Struct Reference

libzypp 17.38.11

zypp::CodeMaps Struct Reference

Wrap static codemap data. More...

## Public Member Functions
LanguageCode | language (IdString index_r)
CountryCode | country (IdString index_r)
std::string | name (IdString index_r)
Locale | fallback (IdString index_r)

## Static Public Member Functions
static IdString | withoutTrash (IdString code_r)
| Return IdString without trailing garbage.
static IdString | withoutTrash (const std::string &code_r)
| Return IdString without trailing garbage.
static IdString | withoutTrash (const char *code_r)
| Return IdString without trailing garbage.
static IdString | combineLC (const LanguageCode &language_r, const CountryCode &country_r)
| Return IdString from language/country codes.
static CodeMaps & | instance ()
| The singleton.

## Private Types
using | CodeMap = std::unordered_map<IdString, LC>

## Private Member Functions
| CodeMaps ()
| Ctor initializes the code maps.
const LC & | getIndex (IdString index_r)
| Return LC for index_r, creating it if necessary.

## Static Private Member Functions
static IdString | withoutTrash (boost::string_ref code_r)
static boost::string_ref::size_type | trashStart (boost::string_ref code_r)
static boost::string_ref::size_type | trashStart (IdString code_r)

## Private Attributes
CodeMap | _codeMap

## Detailed Description

Wrap static codemap data.

Definition at line 27 of file Locale.cc.

## Member Typedef Documentation

## ◆ CodeMap

using zypp::CodeMaps::CodeMap = std::unordered_map<IdString, LC>
| private

Definition at line 134 of file Locale.cc.

## Constructor & Destructor Documentation

## ◆ CodeMaps()

zypp::CodeMaps::CodeMaps | ( |  | ) |
| inlineprivate

Ctor initializes the code maps.

Definition at line 137 of file Locale.cc.

## Member Function Documentation

## ◆ withoutTrash() [1/4]

IdString zypp::CodeMaps::withoutTrash | ( | IdString | code_r | ) |
| inlinestatic

Return IdString without trailing garbage.

Definition at line 30 of file Locale.cc.

## ◆ withoutTrash() [2/4]

IdString zypp::CodeMaps::withoutTrash | ( | const std::string & | code_r | ) |
| inlinestatic

Return IdString without trailing garbage.

Definition at line 39 of file Locale.cc.

## ◆ withoutTrash() [3/4]

IdString zypp::CodeMaps::withoutTrash | ( | const char * | code_r | ) |
| inlinestatic

Return IdString without trailing garbage.

Definition at line 43 of file Locale.cc.

## ◆ combineLC()

IdString zypp::CodeMaps::combineLC | ( | const LanguageCode & | language_r,
|  | const CountryCode & | country_r )
| inlinestatic

Return IdString from language/country codes.

Definition at line 47 of file Locale.cc.

## ◆ instance()

CodeMaps & zypp::CodeMaps::instance | ( |  | ) |
| inlinestatic

The singleton.

Definition at line 69 of file Locale.cc.

## ◆ language()

LanguageCode zypp::CodeMaps::language | ( | IdString | index_r | ) |
| inline

Definition at line 75 of file Locale.cc.

## ◆ country()

CountryCode zypp::CodeMaps::country | ( | IdString | index_r | ) |
| inline

Definition at line 78 of file Locale.cc.

## ◆ name()

std::string zypp::CodeMaps::name | ( | IdString | index_r | ) |
| inline

Definition at line 81 of file Locale.cc.

## ◆ fallback()

Locale zypp::CodeMaps::fallback | ( | IdString | index_r | ) |
| inline

Definition at line 94 of file Locale.cc.

## ◆ withoutTrash() [4/4]

IdString zypp::CodeMaps::withoutTrash | ( | boost::string_ref | code_r | ) |
| inlinestaticprivate

Definition at line 112 of file Locale.cc.

## ◆ trashStart() [1/2]

boost::string_ref::size_type zypp::CodeMaps::trashStart | ( | boost::string_ref | code_r | ) |
| inlinestaticprivate

Definition at line 120 of file Locale.cc.

## ◆ trashStart() [2/2]

boost::string_ref::size_type zypp::CodeMaps::trashStart | ( | IdString | code_r | ) |
| inlinestaticprivate

Definition at line 123 of file Locale.cc.

## ◆ getIndex()

const LC & zypp::CodeMaps::getIndex | ( | IdString | index_r | ) |
| inlineprivate

Return LC for index_r, creating it if necessary.

Definition at line 143 of file Locale.cc.

## Member Data Documentation

## ◆ _codeMap

CodeMap zypp::CodeMaps::_codeMap
| private

Definition at line 169 of file Locale.cc.

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

- zypp/Locale.cc