libzypp 17.37.10

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 24 of file Locale.cc.

## Member Typedef Documentation

## ◆ CodeMap

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

Definition at line 131 of file Locale.cc.

## Constructor & Destructor Documentation

## ◆ CodeMaps()

zypp::CodeMaps::CodeMaps | ( |  | ) |
| inline private

Ctor initializes the code maps.

Definition at line 134 of file Locale.cc.

## Member Function Documentation

## ◆ withoutTrash() [1/4]

IdString zypp::CodeMaps::withoutTrash | ( | IdString | code_r | ) |
| inline static

Return IdString without trailing garbage.

Definition at line 27 of file Locale.cc.

## ◆ withoutTrash() [2/4]

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

Return IdString without trailing garbage.

Definition at line 36 of file Locale.cc.

## ◆ withoutTrash() [3/4]

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

Return IdString without trailing garbage.

Definition at line 40 of file Locale.cc.

## ◆ combineLC()

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

Return IdString from language/country codes.

Definition at line 44 of file Locale.cc.

## ◆ instance()

CodeMaps & zypp::CodeMaps::instance | ( |  | ) |
| inline static

The singleton.

Definition at line 66 of file Locale.cc.

## ◆ language()

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

Definition at line 72 of file Locale.cc.

## ◆ country()

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

Definition at line 75 of file Locale.cc.

## ◆ name()

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

Definition at line 78 of file Locale.cc.

## ◆ fallback()

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

Definition at line 91 of file Locale.cc.

## ◆ withoutTrash() [4/4]

IdString zypp::CodeMaps::withoutTrash | ( | boost::string_ref | code_r | ) |
| inline static private

Definition at line 109 of file Locale.cc.

## ◆ trashStart() [1/2]

boost::string_ref::size_type zypp::CodeMaps::trashStart | ( | boost::string_ref | code_r | ) |
| inline static private

Definition at line 117 of file Locale.cc.

## ◆ trashStart() [2/2]

boost::string_ref::size_type zypp::CodeMaps::trashStart | ( | IdString | code_r | ) |
| inline static private

Definition at line 120 of file Locale.cc.

## ◆ getIndex()

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

Return LC for index_r, creating it if necessary.

Definition at line 140 of file Locale.cc.

## Member Data Documentation

## ◆ _codeMap

CodeMap zypp::CodeMaps::_codeMap
| private

Definition at line 166 of file Locale.cc.

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

- zypp/Locale.cc