KVIrc
4.9.2
DeveloperAPIs
|
The KviMessageCatalogue class. More...
#include <KviMessageCatalogue.h>
Public Member Functions | |
KviMessageCatalogue () | |
Creates an instance of KviMessageCatalogue. More... | |
bool | load (const QString &szName) |
const char * | translate (const char *pcText) |
Translates the string. More... | |
const QString & | translateToQString (const char *pcText) |
Translates the string. More... | |
~KviMessageCatalogue () | |
Destroys the instance of KviMessageCatalogue and frees all the relevant resources. More... | |
Protected Attributes | |
KviPointerHashTable< const char *, KviTranslationEntry > * | m_pMessages |
QTextCodec * | m_pTextCodec |
The KviMessageCatalogue class.
KviMessageCatalogue::KviMessageCatalogue | ( | ) |
Creates an instance of KviMessageCatalogue.
References m_pMessages, m_pTextCodec, and KviPointerHashTable< Key, T >::setAutoDelete().
KviMessageCatalogue::~KviMessageCatalogue | ( | ) |
Destroys the instance of KviMessageCatalogue and frees all the relevant resources.
References m_pMessages.
bool KviMessageCatalogue::load | ( | const QString & | szName | ) |
szName |
References KviMemory::allocate(), KviLocale::codecForName(), KviCString::cutFromFirst(), KviCString::cutLeft(), e, f, KviCString::findFirstIdx(), KviMemory::free(), KviCString::hasData(), i, KviPointerHashTable< Key, T >::insert(), KviLocale::instance(), kvi_getFirstBiggerPrime(), KVI_LOCALE_MAGIC, KVI_LOCALE_MAGIC_SWAPPED, KVI_SWAP_IF_NEEDED, KviCString::len(), m_pMessages, m_pTextCodec, KviTranslationEntry::m_szEncodedTranslation, KviTranslationEntry::m_szKey, GnuMoFileHeader::magic, MO_REVISION_NUMBER, GnuMoFileHeader::nstrings, GnuMoFileHeader::orig_tab_offset, KviCString::ptr(), GnuMoFileHeader::revision, KviPointerHashTable< Key, T >::setAutoDelete(), GnuMoFileHeader::trans_tab_offset, and KviCString::trim().
Referenced by KviLocale::KviLocale(), and KviLocale::loadCatalogue().
const char * KviMessageCatalogue::translate | ( | const char * | pcText | ) |
Translates the string.
pcText | The text to translate |
References KviPointerHashTable< Key, T >::find(), m_pMessages, KviTranslationEntry::m_szEncodedTranslation, and KviCString::ptr().
Referenced by KviLocale::translate().
const QString & KviMessageCatalogue::translateToQString | ( | const char * | pcText | ) |
Translates the string.
pcText | The text to translate |
References KviPointerHashTable< Key, T >::find(), KviPointerHashTable< Key, T >::insert(), m_pMessages, m_pTextCodec, KviTranslationEntry::m_pTranslation, KviTranslationEntry::m_szEncodedTranslation, KviTranslationEntry::m_szKey, and KviCString::ptr().
Referenced by KviKvsCoreFunctions::KVSCF(), KviTranslator::translate(), and KviLocale::translateToQString().
|
protected |
Referenced by KviMessageCatalogue(), load(), translate(), translateToQString(), and ~KviMessageCatalogue().
|
protected |
Referenced by KviMessageCatalogue(), load(), and translateToQString().