libzypp  15.28.6
zypp::CodeMaps Struct Reference

Wrap static codemap data. More...

Classes

struct  LC
 

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. More...
 
static IdString withoutTrash (const std::string &code_r)
 Return IdString without trailing garbage. More...
 
static IdString withoutTrash (const char *code_r)
 Return IdString without trailing garbage. More...
 
static IdString combineLC (LanguageCode language_r, CountryCode country_r)
 Return IdString from language/country codes. More...
 
static CodeMaps & instance ()
 The singleton. More...
 

Private Types

typedef std::unordered_map
< IdString, LC
CodeMap
 

Private Member Functions

 CodeMaps ()
 Ctor initializes the code maps. More...
 
const LCgetIndex (IdString index_r)
 Return LC for index_r, creating it if necessary. More...
 

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

typedef std::unordered_map<IdString,LC> zypp::CodeMaps::CodeMap
private

Definition at line 131 of file Locale.cc.

Constructor & Destructor Documentation

zypp::CodeMaps::CodeMaps ( )
inlineprivate

Ctor initializes the code maps.

Definition at line 134 of file Locale.cc.

Member Function Documentation

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

Return IdString without trailing garbage.

Definition at line 27 of file Locale.cc.

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

Return IdString without trailing garbage.

Definition at line 36 of file Locale.cc.

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

Return IdString without trailing garbage.

Definition at line 40 of file Locale.cc.

static IdString zypp::CodeMaps::combineLC ( LanguageCode  language_r,
CountryCode  country_r 
)
inlinestatic

Return IdString from language/country codes.

Definition at line 44 of file Locale.cc.

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

The singleton.

Definition at line 66 of file Locale.cc.

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

Definition at line 72 of file Locale.cc.

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

Definition at line 75 of file Locale.cc.

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

Definition at line 78 of file Locale.cc.

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

Definition at line 91 of file Locale.cc.

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

Definition at line 109 of file Locale.cc.

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

Definition at line 117 of file Locale.cc.

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

Definition at line 120 of file Locale.cc.

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

Return LC for index_r, creating it if necessary.

Definition at line 140 of file Locale.cc.

Member Data Documentation

CodeMap zypp::CodeMaps::_codeMap
private

Definition at line 166 of file Locale.cc.


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