Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CLocalizeStrings Class Reference

#include <LocalizeStrings.h>

Inheritance diagram for CLocalizeStrings:
ILocalizer

Public Member Functions

 CLocalizeStrings (void)
 
 ~CLocalizeStrings (void) override
 
bool Load (const std::string &strPathName, const std::string &strLanguage)
 
bool LoadSkinStrings (const std::string &path, const std::string &language)
 
bool LoadAddonStrings (const std::string &path, const std::string &language, const std::string &addonId)
 
void ClearSkinStrings ()
 
const std::string & Get (uint32_t code) const
 
std::string GetAddonString (const std::string &addonId, uint32_t code)
 
void Clear ()
 
std::string Localize (std::uint32_t code) const override
 
- Public Member Functions inherited from ILocalizer
virtual ~ILocalizer ()=default
 

Protected Types

typedef std::map< uint32_t, LocStr >::const_iterator ciStrings
 
typedef std::map< uint32_t, LocStr >::iterator iStrings
 

Protected Member Functions

void Clear (uint32_t start, uint32_t end)
 
- Protected Member Functions inherited from ILocalizer
 ILocalizer ()=default
 

Protected Attributes

std::map< uint32_t, LocStrm_strings
 
std::map< std::string, std::map< uint32_t, LocStr > > m_addonStrings
 
CSharedSection m_stringsMutex
 
CSharedSection m_addonStringsMutex
 

Member Typedef Documentation

◆ ciStrings

std::map<uint32_t,LocStr>::const_iterator CLocalizeStrings::ciStrings
protected

◆ iStrings

std::map<uint32_t,LocStr>::iterator CLocalizeStrings::iStrings
protected

Constructor & Destructor Documentation

◆ CLocalizeStrings()

CLocalizeStrings::CLocalizeStrings ( void )
default

◆ ~CLocalizeStrings()

CLocalizeStrings::~CLocalizeStrings ( void )
overridedefault

Member Function Documentation

◆ Clear() [1/2]

void CLocalizeStrings::Clear ( )

◆ Clear() [2/2]

void CLocalizeStrings::Clear ( uint32_t start,
uint32_t end )
protected

◆ ClearSkinStrings()

void CLocalizeStrings::ClearSkinStrings ( )

◆ Get()

const std::string & CLocalizeStrings::Get ( uint32_t code) const

◆ GetAddonString()

std::string CLocalizeStrings::GetAddonString ( const std::string & addonId,
uint32_t code )

◆ Load()

bool CLocalizeStrings::Load ( const std::string & strPathName,
const std::string & strLanguage )

◆ LoadAddonStrings()

bool CLocalizeStrings::LoadAddonStrings ( const std::string & path,
const std::string & language,
const std::string & addonId )

◆ LoadSkinStrings()

bool CLocalizeStrings::LoadSkinStrings ( const std::string & path,
const std::string & language )
Todo
shouldn't hold lock while loading file

◆ Localize()

std::string CLocalizeStrings::Localize ( std::uint32_t code) const
inlineoverridevirtual

Implements ILocalizer.

Member Data Documentation

◆ m_addonStrings

std::map<std::string, std::map<uint32_t, LocStr> > CLocalizeStrings::m_addonStrings
protected

◆ m_addonStringsMutex

CSharedSection CLocalizeStrings::m_addonStringsMutex
protected

◆ m_strings

std::map<uint32_t, LocStr> CLocalizeStrings::m_strings
protected

◆ m_stringsMutex

CSharedSection CLocalizeStrings::m_stringsMutex
mutableprotected

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